Update alpine-nextcloud.sh

This commit is contained in:
nicedevil007 2023-09-28 17:11:02 +02:00
parent e67d9ecc4b
commit a356f6a3c4
1 changed files with 9 additions and 3 deletions

View File

@ -73,9 +73,15 @@ function update_script() {
header_info
case $CHOICE in
1)
apk update && apk upgrade
su nextcloud -s /bin/sh -c 'php82 /usr/share/webapps/nextcloud/occ upgrade'
su nextcloud -s /bin/sh -c 'php82 /usr/share/webapps/nextcloud/occ db:add-missing-indices'
INSTALLED=$(grep -Rnw '/usr/share/webapps/nextcloud/config/config.php' -e '\'installed\'' => false,')
if [ -z "$INSTALLED" ]
then
apk update && apk upgrade
su nextcloud -s /bin/sh -c 'php82 /usr/share/webapps/nextcloud/occ upgrade'
su nextcloud -s /bin/sh -c 'php82 /usr/share/webapps/nextcloud/occ db:add-missing-indices'
else
msg_error "${APP} not initialized for the first time, go to the WebUI first."
fi
exit
;;
2)