update_nextcloud.sh: run 'Migrating the mimetypes' job after update.

This commit is contained in:
Christoph 2024-10-19 01:43:03 +02:00
parent 6882e48d80
commit 4abff5e4fa

View File

@ -1436,23 +1436,8 @@ else
[[ $OK = "yes" ]] || fatal "Interrupted by user."
fi
echo ""
echo " Would you like to run the cronjob manually - it may take a realy long time! "
echo ""
echononl " Run cronjob manually [yes/no]: "
read OK
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
echononl "Wrong entry! - repeat [yes/no]: "
read OK
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
done
if [[ $OK = "yes" ]] ; then
echononl " Run cronjob manually.. (can take a very long time)"
echo_wait
su -c "${PHP_BIN} ${WEB_BASE_DIR}/htdocs/cron.php" -s /bin/bash $HTTP_USER > $log_file 2>&1
echononl " Migrating the mimetypes .."
su -c "${PHP_BIN} ${WEB_BASE_DIR}/htdocs/occ maintenance:repair --include-expensive" -s /bin/bash $HTTP_USER > $log_file 2>&1
if [[ $? -eq 0 ]]; then
echo_ok
else
@ -1467,9 +1452,43 @@ if [[ $OK = "yes" ]] ; then
read OK
done
[[ $OK = "yes" ]] || fatal "Interrupted by user."
fi
fi
fi
#echo ""
#echo " Would you like to run the cronjob manually - it may take a realy long time! "
#echo ""
#echononl " Run cronjob manually [yes/no]: "
#read OK
#OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
#while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
# echononl "Wrong entry! - repeat [yes/no]: "
# read OK
# OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
#done
#if [[ $OK = "yes" ]] ; then
#
# echononl " Run cronjob manually.. (can take a very long time)"
# echo_wait
# su -c "${PHP_BIN} ${WEB_BASE_DIR}/htdocs/cron.php" -s /bin/bash $HTTP_USER > $log_file 2>&1
# if [[ $? -eq 0 ]]; then
# echo_ok
# else
# echo_failed
# error "$(cat $log_file)"
#
# echononl "continue anyway [yes/no]: "
# read OK
# OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
# while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
# echononl "Wrong entry! - repeat [yes/no]: "
# read OK
# done
# [[ $OK = "yes" ]] || fatal "Interrupted by user."
#
# fi
#fi
blank_line