From e7c77d92643e1f10bc4edde0a7cd9759ec57f5de Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Mon, 15 Sep 2014 10:45:12 +0200 Subject: [PATCH] =?UTF-8?q?Cron=20d=C3=A9plac=C3=A9=20dans=20cron.d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/install | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index 995b451..3408dd2 100644 --- a/scripts/install +++ b/scripts/install @@ -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"