diff --git a/conf/logrotate b/conf/logrotate new file mode 100644 index 0000000..c145772 --- /dev/null +++ b/conf/logrotate @@ -0,0 +1,9 @@ +YNH_LOGFILE +{ + rotate 5 + weekly + nomissingok + notifempty + compress + copytruncate +} \ No newline at end of file diff --git a/scripts/install b/scripts/install index 1b7d2ca..edc1d29 100644 --- a/scripts/install +++ b/scripts/install @@ -64,6 +64,9 @@ sudo update-rc.d ynh-ghostblog defaults sudo service ynh-ghostblog start sudo yunohost app service ynh-ghostblog -l $logfile +sed -i "s@YNH_LOGFILE@$logfile@g" ../conf/logrotate +sudo cp ../conf/logrotate /etc/logrotate.d/ynh-ghostblog + echo "Reloading Nginx..." sudo service nginx reload