diff --git a/conf/ffsync.logrotate b/conf/ffsync.logrotate new file mode 100644 index 0000000..c5f42b7 --- /dev/null +++ b/conf/ffsync.logrotate @@ -0,0 +1,9 @@ +"/var/log/ffsync.log" { + copytruncate + daily + rotate 7 + compress + delaycompress + missingok + notifempty +} diff --git a/scripts/install b/scripts/install index 91c6a8d..54bbf4d 100644 --- a/scripts/install +++ b/scripts/install @@ -38,6 +38,7 @@ final_path=/opt/yunohost/ffsync sudo mkdir -p $final_path sudo cp -a ../sources/* $final_path sudo cp ../conf/ffsync /etc/init.d/ +sudo cp ../conf/ffsync.logrotate /etc/logrotate.d/ffsync # Set permissions to ffsync directory sudo useradd ffsync -d $final_path diff --git a/scripts/remove b/scripts/remove index f8d9f0b..5bcaf02 100644 --- a/scripts/remove +++ b/scripts/remove @@ -11,7 +11,7 @@ sudo rm -f /etc/nginx/conf.d/$domain.d/ffsync.conf sudo service ffsync stop sudo update-rc.d ffsync remove sudo rm /etc/init.d/ffsync - +sudo rm /etc/logrotate.d/ffsync sudo service nginx reload sudo userdel ffsync diff --git a/scripts/upgrade b/scripts/upgrade index d37e350..cf91e08 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,6 +20,7 @@ final_path=/opt/yunohost/ffsync sudo mkdir -p $final_path sudo cp -a ../sources/* $final_path sudo cp ../conf/ffsync /etc/init.d/ +sudo cp ../conf/ffsync.logrotate /etc/logrotate.d/ffsync # Set permissions to ffsync directory sudo useradd ffsync -d $final_path