mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-05-28 14:30:13 +00:00
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
27 lines
505 B
Bash
27 lines
505 B
Bash
#!/bin/bash
|
|
# SPDX-FileCopyrightText: 2021 Nextcloud GmbH <https://nextcloud.com>
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
if [ "$AIO_LOG_LEVEL" = 'debug' ]; then
|
|
set -x
|
|
fi
|
|
|
|
wait_for_cron() {
|
|
set -x
|
|
while [ -n "$(pgrep -f /var/www/html/cron.php)" ]; do
|
|
echo "Waiting for cron to stop..."
|
|
sleep 5
|
|
done
|
|
echo "Cronjob successfully exited."
|
|
exit
|
|
}
|
|
|
|
trap wait_for_cron SIGINT SIGTERM
|
|
|
|
while true; do
|
|
php -f /var/www/html/cron.php &
|
|
sleep 5m &
|
|
wait $!
|
|
done
|