1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ffsync_ynh.git synced 2024-09-03 18:26:38 +02:00

add logrotate

This commit is contained in:
Adrien Beudin 2015-02-16 11:59:22 +01:00
parent f670ef1fc0
commit c6dbb53709
4 changed files with 12 additions and 1 deletions

9
conf/ffsync.logrotate Normal file
View file

@ -0,0 +1,9 @@
"/var/log/ffsync.log" {
copytruncate
daily
rotate 7
compress
delaycompress
missingok
notifempty
}

View file

@ -38,6 +38,7 @@ final_path=/opt/yunohost/ffsync
sudo mkdir -p $final_path sudo mkdir -p $final_path
sudo cp -a ../sources/* $final_path sudo cp -a ../sources/* $final_path
sudo cp ../conf/ffsync /etc/init.d/ sudo cp ../conf/ffsync /etc/init.d/
sudo cp ../conf/ffsync.logrotate /etc/logrotate.d/ffsync
# Set permissions to ffsync directory # Set permissions to ffsync directory
sudo useradd ffsync -d $final_path sudo useradd ffsync -d $final_path

View file

@ -11,7 +11,7 @@ sudo rm -f /etc/nginx/conf.d/$domain.d/ffsync.conf
sudo service ffsync stop sudo service ffsync stop
sudo update-rc.d ffsync remove sudo update-rc.d ffsync remove
sudo rm /etc/init.d/ffsync sudo rm /etc/init.d/ffsync
sudo rm /etc/logrotate.d/ffsync
sudo service nginx reload sudo service nginx reload
sudo userdel ffsync sudo userdel ffsync

View file

@ -20,6 +20,7 @@ final_path=/opt/yunohost/ffsync
sudo mkdir -p $final_path sudo mkdir -p $final_path
sudo cp -a ../sources/* $final_path sudo cp -a ../sources/* $final_path
sudo cp ../conf/ffsync /etc/init.d/ sudo cp ../conf/ffsync /etc/init.d/
sudo cp ../conf/ffsync.logrotate /etc/logrotate.d/ffsync
# Set permissions to ffsync directory # Set permissions to ffsync directory
sudo useradd ffsync -d $final_path sudo useradd ffsync -d $final_path