diff --git a/scripts/install b/scripts/install index 1cc9db3..a5a27c9 100644 --- a/scripts/install +++ b/scripts/install @@ -113,6 +113,10 @@ sudo cp ../conf/cron_lutim /etc/cron.d/$app sudo sed -i "s@__FINALPATH__@$final_path/@g" /etc/cron.d/$app sudo chmod +x $final_path/script/lutim +# Configuration de logrotate +sed -i "s@__FINALPATH__@$final_path@g" ../conf/logrotate +sudo cp ../conf/logrotate /etc/logrotate.d/$app + # Installation de lutim via carton sudo mkdir -p /var/log/$app/ cd $final_path @@ -154,10 +158,6 @@ sudo chown -R www-data: "$final_path" # Add lutim as a service sudo yunohost service add lutim -l $final_path/log/production.log -# Configuration de logrotate -sed -i "s@__FINALPATH__@$final_path@g" ../conf/logrotate -sudo cp ../conf/logrotate /etc/logrotate.d/$app - # Recharge la configuration Nginx sudo service nginx reload diff --git a/scripts/upgrade b/scripts/upgrade index 6cb5524..01b1929 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -77,6 +77,10 @@ fi sudo cp ../conf/cron_lutim /etc/cron.d/$app sudo sed -i "s@__FINALPATH__@$final_path/@g" /etc/cron.d/$app +# Configuration de logrotate +sed -i "s@__FINALPATH__@$final_path@g" ../conf/logrotate +sudo cp ../conf/logrotate /etc/logrotate.d/$app + # Mise à jour de lutim via carton cd $final_path sudo carton install 2>&1 | sudo tee -a "/var/log/$app/setup_carton.log" @@ -93,10 +97,6 @@ sudo chown -R www-data: $final_path # Restart lutim sudo service lutim restart -# Configuration de logrotate -sed -i "s@__FINALPATH__@$final_path@g" ../conf/logrotate -sudo cp ../conf/logrotate /etc/logrotate.d/$app - # Recharge la configuration Nginx sudo service nginx reload