mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-01 19:48:47 +02:00
Update 02-init_steps.sh
This commit is contained in:
@@ -34,6 +34,13 @@ if [ ! -f /data/config/www/nextcloud/occ ]; then
|
|||||||
LAUNCHER="apk"
|
LAUNCHER="apk"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check current version
|
||||||
|
if [ -f /data/config/www/nextcloud/version.php]; then
|
||||||
|
CURRENTVERSION="$(sed -n "s|.*\OC_VersionString = '*\(.*[^ ]\) *';.*|\1|p" /data/config/www/nextcloud/version.php)"
|
||||||
|
else
|
||||||
|
CURRENTVERSION="Not found"
|
||||||
|
fi
|
||||||
|
|
||||||
# If not installed, or files not available
|
# If not installed, or files not available
|
||||||
if [[ $($LAUNCHER -V 2>&1) == *"not installed"* ]] || [ ! -f /data/config/www/nextcloud/version.php ]; then
|
if [[ $($LAUNCHER -V 2>&1) == *"not installed"* ]] || [ ! -f /data/config/www/nextcloud/version.php ]; then
|
||||||
bashio::log.green "--------------------------------------------------------------------------------------------------------------"
|
bashio::log.green "--------------------------------------------------------------------------------------------------------------"
|
||||||
@@ -42,8 +49,6 @@ if [[ $($LAUNCHER -V 2>&1) == *"not installed"* ]] || [ ! -f /data/config/www/ne
|
|||||||
bashio::log.green " "
|
bashio::log.green " "
|
||||||
exit 0
|
exit 0
|
||||||
elif [[ $($LAUNCHER -V 2>&1) == *"Nextcloud"* ]]; then
|
elif [[ $($LAUNCHER -V 2>&1) == *"Nextcloud"* ]]; then
|
||||||
# Check current version
|
|
||||||
CURRENTVERSION="$(sed -n "s|.*\OC_VersionString = '*\(.*[^ ]\) *';.*|\1|p" /data/config/www/nextcloud/version.php)"
|
|
||||||
# Log
|
# Log
|
||||||
bashio::log.green "--------------------------------------"
|
bashio::log.green "--------------------------------------"
|
||||||
bashio::log.green "Nextcloud $CURRENTVERSION is installed"
|
bashio::log.green "Nextcloud $CURRENTVERSION is installed"
|
||||||
|
|||||||
Reference in New Issue
Block a user