mirror of
https://github.com/YunoHost-Apps/leed_ynh.git
synced 2024-09-03 19:26:32 +02:00
Cron déplacé dans cron.d
This commit is contained in:
parent
3ecfa2529a
commit
e7c77d9264
1 changed files with 5 additions and 4 deletions
|
@ -79,10 +79,11 @@ sudo chown -R www-data $final_path/cache $final_path/plugins
|
|||
code_sync=$(mysql -h localhost -u $db_user -p$db_pwd -s $db_user -e 'SELECT value FROM leed_configuration WHERE `key`="synchronisationCode"' | sed -n 1p)
|
||||
|
||||
# Mise en place du cron pour la synchronisation
|
||||
sudo crontab -l -u $admin > crontab_file
|
||||
echo "# Mise a jour de leed toutes les 2 heures." >> crontab_file
|
||||
echo "0 */2 * * * wget -q -O - \"https://$domain$path/action.php?action=synchronize&code=$code_sync\" > /dev/null 2>&1" >> crontab_file
|
||||
sudo crontab -u $admin crontab_file
|
||||
sed -i "s@__ADMIN__@$admin@g" ../conf/cron_leed
|
||||
sed -i "s@__DOMAIN__@$domain@g" ../conf/cron_leed
|
||||
sed -i "s@__PATH__@$path@g" ../conf/cron_leed
|
||||
sed -i "s@__CODESYNC__@$code_sync@g" ../conf/cron_leed
|
||||
sudo cp ../conf/cron_leed /etc/cron.d/leed
|
||||
|
||||
# Make app private if necessary
|
||||
sudo yunohost app setting leed is_public -v "$is_public"
|
||||
|
|
Loading…
Reference in a new issue