mirror of
https://github.com/EV21/uberspace-helper.git
synced 2026-10-07 20:33:18 +02:00
feat(Nextcloud): execute occ upgrade for app updates
This commit is contained in:
3 files changed
+22
-1
No files matched your search
+18
-1
@@ -6,7 +6,7 @@ function install_nextcloud
|
||||
{
|
||||
echo "Please set your Nextcloud login credentials."
|
||||
read -r -p "Nextcloud admin user: " NEXTCLOUD_ADMIN_USER
|
||||
read -r -p "Nextcloud admin password: " NEXTCLOUD_ADMIN_PASS
|
||||
ask_for_password
|
||||
trusted_domain="$USER.uber.space"
|
||||
setup_php
|
||||
# simply get the first password string from ~/.my.cnf
|
||||
@@ -105,12 +105,27 @@ function uninstall_nextcloud
|
||||
rm -r ~/html/* ~/html/.htaccess ~/html/.user.ini ~/_nextcloud_completion
|
||||
mysql --verbose --execute="DROP DATABASE ${USER}_nextcloud"
|
||||
rm ~/bin/ncc ~/bin/nextcloud-update
|
||||
sed --in-place '/_nextcloud_completion/d' ~/.bash_profile
|
||||
unlink ~/bin/notify_push
|
||||
unlink ~/logs/nextcloud.log
|
||||
unlink ~/logs/nextcloud-updater.log
|
||||
set_critical_section
|
||||
}
|
||||
|
||||
function ask_for_password
|
||||
{
|
||||
echo "Note: Your password input will not be visible."
|
||||
read -s -r -p "$APP_NAME admin password: " NEXTCLOUD_ADMIN_PASS
|
||||
echo
|
||||
read -s -r -p "$APP_NAME admin password confirmation: " ADMIN_PASS_CONFIRMATION
|
||||
echo
|
||||
while [ -z "$NEXTCLOUD_ADMIN_PASS" ] || [ "$NEXTCLOUD_ADMIN_PASS" != "$ADMIN_PASS_CONFIRMATION" ]
|
||||
do
|
||||
echo That was not correct, try again
|
||||
ask_for_password
|
||||
done
|
||||
}
|
||||
|
||||
function process_parameters
|
||||
{
|
||||
while test $# -gt 0
|
||||
@@ -272,6 +287,8 @@ ncc db:add-missing-indices --no-interaction
|
||||
ncc db:convert-filecache-bigint --no-interaction
|
||||
|
||||
ncc app:update --all
|
||||
## App updates may require additional steps to be done by the `upgrade` command
|
||||
ncc upgrade
|
||||
/usr/sbin/restorecon -R $APP_LOCATION
|
||||
|
||||
if test -f ~/etc/services.d/notify_push.ini
|
||||
|
||||
@@ -98,6 +98,8 @@ function do_update_procedure
|
||||
ncc db:add-missing-indices --no-interaction
|
||||
ncc db:convert-filecache-bigint --no-interaction
|
||||
ncc app:update --all
|
||||
## App updates may require additional steps to be done by the `upgrade` command
|
||||
ncc upgrade
|
||||
/usr/sbin/restorecon -R "$APP_LOCATION"
|
||||
if test -f ~/etc/services.d/notify_push.ini
|
||||
then supervisorctl restart notify_push
|
||||
|
||||
@@ -21,6 +21,8 @@ ncc db:add-missing-indices --no-interaction
|
||||
ncc db:convert-filecache-bigint --no-interaction
|
||||
|
||||
ncc app:update --all
|
||||
## App updates may require additional steps to be done by the `upgrade` command
|
||||
ncc upgrade
|
||||
/usr/sbin/restorecon -R $APP_LOCATION
|
||||
|
||||
if test -f ~/etc/services.d/notify_push.ini
|
||||
|
||||
Reference in new issue
Block a user