updated style

This commit is contained in:
Ivan Jurišić 2023-09-22 08:11:55 +02:00
parent 57c145c5a3
commit 42c17494d8

View File

@ -20,7 +20,7 @@ set -e
export APACHE2_MAINTSCRIPT_HELPER_QUIET=1 export APACHE2_MAINTSCRIPT_HELPER_QUIET=1
case "$1" in case "$1" in
configure) configure)
# Apache conf # Apache conf
if [ "a2query -c nextcloud"=~"No conf matches nextcloud" ]; then if [ "a2query -c nextcloud"=~"No conf matches nextcloud" ]; then
@ -29,7 +29,7 @@ case "$1" in
fi fi
# Apache modules # Apache modules
if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then if [ -e /usr/share/apache2/apache2-maintscript-helper ]; then
. /usr/share/apache2/apache2-maintscript-helper . /usr/share/apache2/apache2-maintscript-helper
apache2_invoke enmod rewrite || exit $? apache2_invoke enmod rewrite || exit $?
apache2_invoke enmod headers || exit $? apache2_invoke enmod headers || exit $?
@ -44,16 +44,16 @@ case "$1" in
elif [ "$(su 'www-data' -s /bin/sh -c 'php /var/www/nextcloud/occ status' | grep 'installed:' | cut -f2 -d ':' | xargs)" = "true" ]; then elif [ "$(su 'www-data' -s /bin/sh -c 'php /var/www/nextcloud/occ status' | grep 'installed:' | cut -f2 -d ':' | xargs)" = "true" ]; then
su 'www-data' -s /bin/sh -c 'php /var/www/nextcloud/occ upgrade' su 'www-data' -s /bin/sh -c 'php /var/www/nextcloud/occ upgrade'
su 'www-data' -s /bin/sh -c 'php /var/www/nextcloud/occ db:add-missing-indices' su 'www-data' -s /bin/sh -c 'php /var/www/nextcloud/occ db:add-missing-indices'
su 'www-data' -s /bin/sh -c 'php /var/www/nextcloud/occ config:system:set --value true upgrade.disable-web' > /dev/null || true su 'www-data' -s /bin/sh -c 'php /var/www/nextcloud/occ config:system:set --value true upgrade.disable-web' >/dev/null || true
else else
echo "Got unexpect answer, occ status can't to read satus of nextcloud. Check php installation." echo "Got unexpect answer, occ status can't to read satus of nextcloud. Check php installation."
fi fi
;; ;;
abort-upgrade|abort-remove|abort-deconfigure) abort-upgrade | abort-remove | abort-deconfigure) ;;
;;
\
*) *)
echo "postinst called with unknown argument \`$1'" >&2 echo "postinst called with unknown argument \`$1'" >&2
exit 1 exit 1