1
0
Fork 0
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:
Maniack Crudelis 2014-09-15 10:45:12 +02:00
parent 3ecfa2529a
commit e7c77d9264

View file

@ -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"