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:
parent
af95c50659
commit
3f6d53dcfa
2 changed files with 20 additions and 0 deletions
14
conf/logrotate.conf
Normal file
14
conf/logrotate.conf
Normal 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
|
||||||
|
}
|
||||||
|
|
|
@ -70,6 +70,12 @@ sudo update-rc.d syncthing defaults
|
||||||
sudo yunohost service add synchting
|
sudo yunohost service add synchting
|
||||||
sudo service syncthing start
|
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
|
# Configure Nginx and reload
|
||||||
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf
|
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf
|
||||||
sed -i "s@PORTTOCHANGE@$syncUIport@g" ../conf/nginx.conf
|
sed -i "s@PORTTOCHANGE@$syncUIport@g" ../conf/nginx.conf
|
||||||
|
|
Loading…
Add table
Reference in a new issue