Flush redis cache and restart redis server after nextcloud is updated.
This commit is contained in:
parent
8bbcd0078c
commit
b7b3fed445
@ -655,7 +655,7 @@ fi
|
|||||||
# -
|
# -
|
||||||
echo ""
|
echo ""
|
||||||
echo " Update Nextcloud"
|
echo " Update Nextcloud"
|
||||||
su -c"/usr/local/php/bin/php ${WEB_BASE_DIR}/htdocs/occ upgrade" -s /bin/bash $HTTP_USER > $log_file 2>&1
|
su -c"/usr/local/php/bin/php ${WEB_BASE_DIR}/htdocs/occ upgrade" -s /bin/bash $HTTP_USER
|
||||||
if [[ $? -eq 0 ]]; then
|
if [[ $? -eq 0 ]]; then
|
||||||
echo_ok
|
echo_ok
|
||||||
else
|
else
|
||||||
@ -714,6 +714,47 @@ else
|
|||||||
warn "The webserver was not running, so it will be keept down!"
|
warn "The webserver was not running, so it will be keept down!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
_redis_cli_bin="$(which redis-cli)"
|
||||||
|
if [[ -z "$_redis_cli_bin" ]]; then
|
||||||
|
if [[ -x "/usr/local/bin/redis-cli" ]]; then
|
||||||
|
_redis_cli_bin="/usr/local/bin/redis-cli"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
echononl " Flush redis cache.."
|
||||||
|
if [[ -x "$_redis_cli_bin" ]]; then
|
||||||
|
$_redis_cli_bin flushall > $log_file 2>&1
|
||||||
|
if [[ $? -eq 0 ]]; then
|
||||||
|
echo_ok
|
||||||
|
else
|
||||||
|
echo_failed
|
||||||
|
error "$(cat $log_file)"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo_skipped
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
echononl " Restart redis server.."
|
||||||
|
if $SYSTEMD_EXISTS ; then
|
||||||
|
systemctl restart redis-server > $log_file 2>&1
|
||||||
|
if [[ $? -eq 0 ]]; then
|
||||||
|
echo_ok
|
||||||
|
else
|
||||||
|
echo_failed
|
||||||
|
error "$(cat $log_file)"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
/etc/init.d/redis-server restart > $log_file 2>&1
|
||||||
|
if [[ $? -eq 0 ]]; then
|
||||||
|
echo_ok
|
||||||
|
else
|
||||||
|
echo_failed
|
||||||
|
error "$(cat $log_file)"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
echononl " Install previously saved crontab from '$_backup_crontab_file'.."
|
echononl " Install previously saved crontab from '$_backup_crontab_file'.."
|
||||||
crontab $_backup_crontab_file > $log_file 2>&1
|
crontab $_backup_crontab_file > $log_file 2>&1
|
||||||
|
Loading…
Reference in New Issue
Block a user