Add usage and verbose output option for what the cron file is getting accomplished.
This commit is contained in:
@ -19,15 +19,39 @@ if (( $RUNNING > 0 )); then
|
|||||||
exit $RUNNING
|
exit $RUNNING
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
verbose=""
|
||||||
|
case "$1" in
|
||||||
|
"-h")
|
||||||
|
cat <<- EOF
|
||||||
|
Script to help with scheduling Nextcloud's cron requirements.
|
||||||
|
Usage: $PROG [-h|-v]
|
||||||
|
-h) Display the usage and help text.
|
||||||
|
-v) Pass a verbose request to cron.php.
|
||||||
|
EOF
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
"-v")
|
||||||
|
verbose="-v"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "ERROR: Unknown parameter '$1', exiting."
|
||||||
|
$DIR/$PROG -h
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# 2023-08-25 From crontab.
|
# 2023-08-25 From crontab.
|
||||||
source $DIR/.env
|
if [[ -f $DIR/.env ]]; then
|
||||||
|
source $DIR/.env
|
||||||
|
else
|
||||||
|
PHP_MEMORY_LIMIT=256M
|
||||||
|
fi
|
||||||
sh -c "
|
sh -c "
|
||||||
docker exec nc-app \
|
docker exec nc-app \
|
||||||
sudo -u www-data \
|
sudo -u www-data \
|
||||||
php \
|
php \
|
||||||
-d apc.enable_cli=1 \
|
-d apc.enable_cli=1 \
|
||||||
-d memory_limit=$PHP_MEMORY_LIMIT \
|
-d memory_limit=$PHP_MEMORY_LIMIT \
|
||||||
-f cron.php \
|
-f cron.php $verbose \
|
||||||
"
|
"
|
||||||
|
|
||||||
# 2023-08-25 From fixes.sh, keep ownership correct and apps up to date.
|
# 2023-08-25 From fixes.sh, keep ownership correct and apps up to date.
|
||||||
|
Reference in New Issue
Block a user