From a07f307fa1d756bc6704a07d7cfd565356f03f91 Mon Sep 17 00:00:00 2001 From: Julien Malik Date: Thu, 20 Mar 2014 17:21:44 +0100 Subject: [PATCH] add logrotate conf --- conf/logrotate | 9 +++++++++ scripts/install | 3 +++ 2 files changed, 12 insertions(+) create mode 100644 conf/logrotate 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