mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-02-02 01:47:44 +01:00
Update 02-init_steps.sh
This commit is contained in:
@@ -30,11 +30,20 @@ done
|
|||||||
|
|
||||||
# Check currently installed version
|
# Check currently installed version
|
||||||
CONTAINERVERSION="$(cat /nextcloudversion)"
|
CONTAINERVERSION="$(cat /nextcloudversion)"
|
||||||
|
|
||||||
|
if [[ $($LAUNCHER -V 2>&1) == *"not installed"* ]]; then
|
||||||
|
bashio::log.yellow "--------------------------------------------------------------------"
|
||||||
|
bashio::log.yellow "Nextcloud is not installed, please install through webui then reboot"
|
||||||
|
bashio::log.yellow "--------------------------------------------------------------------"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -f /data/config/www/nextcloud/version.php ]; then
|
if [ -f /data/config/www/nextcloud/version.php ]; then
|
||||||
CURRENTVERSION="$(sed -n "s|.*\OC_VersionString = '*\(.*[^ ]\) *';.*|\1|p" /data/config/www/nextcloud/version.php)"
|
CURRENTVERSION="$(sed -n "s|.*\OC_VersionString = '*\(.*[^ ]\) *';.*|\1|p" /data/config/www/nextcloud/version.php)"
|
||||||
bashio::log.green "--------------------------------------"
|
bashio::log.green "--------------------------------------"
|
||||||
bashio::log.green "Nextcloud $CURRENTVERSION is installed"
|
bashio::log.green "Nextcloud $CURRENTVERSION is installed"
|
||||||
bashio::log.green "--------------------------------------"
|
bashio::log.green "--------------------------------------"
|
||||||
|
|
||||||
else
|
else
|
||||||
if [ -d /data/config/www/nextcloud ]; then rm -r /data/config/www/nextcloud; fi
|
if [ -d /data/config/www/nextcloud ]; then rm -r /data/config/www/nextcloud; fi
|
||||||
CURRENTVERSION="$CONTAINERVERSION"
|
CURRENTVERSION="$CONTAINERVERSION"
|
||||||
@@ -43,6 +52,7 @@ else
|
|||||||
bashio::log.green "--------------------------------------------------------------------------------------------------------------"
|
bashio::log.green "--------------------------------------------------------------------------------------------------------------"
|
||||||
bashio::log.green " "
|
bashio::log.green " "
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#########################
|
#########################
|
||||||
|
|||||||
Reference in New Issue
Block a user