mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 15:55:13 +00:00
We make sure that we add "php Code/Daemon/Run.php" in /etc/crontab only when we need to (and avoid duplicates)
This commit is contained in:
parent
eed550223c
commit
347f57fa37
1 changed files with 4 additions and 1 deletions
|
@ -395,7 +395,10 @@ function configure_daily_update {
|
|||
function configure_cron_daily {
|
||||
print_info "configuring cron..."
|
||||
# every 10 min for Run.php
|
||||
echo "*/10 * * * * www-data cd $install_path; php Code/Daemon/Run.php Cron >> /dev/null 2>&1" >> /etc/crontab
|
||||
if [[ ! -z $(grep "/var/www/$install_folder; php Code/Daemon/Run.php" /etc/crontab) ]]
|
||||
then
|
||||
echo "*/10 * * * * www-data cd $install_path; php Code/Daemon/Run.php Cron >> /dev/null 2>&1" >> /etc/crontab
|
||||
fi
|
||||
|
||||
# Run external script daily at 05:30 to update repository core and addon
|
||||
echo "#!/bin/sh" > /var/www/$cron_job
|
||||
|
|
Loading…
Reference in a new issue