update style
This commit is contained in:
parent
aa9c44a879
commit
7eb7ece2e0
58
debian/nextcloud-server.postinst
vendored
58
debian/nextcloud-server.postinst
vendored
@ -20,43 +20,43 @@ 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
|
||||||
a2enconf nextcloud || true
|
a2enconf nextcloud || true
|
||||||
apache2ctl restart || true
|
apache2ctl restart || true
|
||||||
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 $?
|
||||||
apache2_invoke enmod env || exit $?
|
apache2_invoke enmod env || exit $?
|
||||||
apache2_invoke enmod dir || exit $?
|
apache2_invoke enmod dir || exit $?
|
||||||
apache2_invoke enmod mime || exit $?
|
apache2_invoke enmod mime || exit $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$(su 'www-data' -s /bin/sh -c 'php /var/www/nextcloud/occ status' | grep 'installed:' | cut -f2 -d ':' | xargs)" = "false" ]; then
|
if [ "$(su 'www-data' -s /bin/sh -c 'php /var/www/nextcloud/occ status' | grep 'installed:' | cut -f2 -d ':' | xargs)" = "false" ]; then
|
||||||
echo "Nextcloud is not configured, please use open web browser http://<your_server_ip>/nextcloud"
|
echo "Nextcloud is not configured, please use open web browser http://<your_server_ip>/nextcloud"
|
||||||
echo "After configure please run su 'www-data' -s /bin/sh -c 'php /var/www/nextcloud/occ config:system:set --value true upgrade.disable-web'"
|
echo "After configure please run su 'www-data' -s /bin/sh -c 'php /var/www/nextcloud/occ config:system:set --value true upgrade.disable-web'"
|
||||||
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
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user