1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/syncthing_ynh.git synced 2024-09-03 20:26:23 +02:00

configure logrotate

This commit is contained in:
Stephane Camhaji 2015-05-11 16:42:43 +02:00
parent af95c50659
commit 3f6d53dcfa
2 changed files with 20 additions and 0 deletions

14
conf/logrotate.conf Normal file
View file

@ -0,0 +1,14 @@
/var/log/syncthing.log {
rotate 4
weekly
minsize 1M
missingok
create 640 root adm
notifempty
compress
delaycompress
postrotate
invoke-rc.d syncthing restart > /dev/null
endscript
}

View file

@ -70,6 +70,12 @@ sudo update-rc.d syncthing defaults
sudo yunohost service add synchting
sudo service syncthing start
# Configure logrotate if present
if [ -d "/etc/logrotate.d" ]; then
sudo cp ../conf/logrotate.conf /etc/logrotate.d/syncthing
sudo chmod 0755 /etc/logrotate.d/syncthing
fi
# Configure Nginx and reload
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf
sed -i "s@PORTTOCHANGE@$syncUIport@g" ../conf/nginx.conf