Skip to content

Commit

Permalink
build: update logrotate rules
Browse files Browse the repository at this point in the history
- fix mamonsu log path for default rule
- remove deprecated rules
  • Loading branch information
mstyushin committed Apr 4, 2024
1 parent 0190077 commit c85d5a4
Showing 1 changed file with 5 additions and 22 deletions.
27 changes: 5 additions & 22 deletions packaging/rpm/SOURCES/mamonsu-logrotate.in
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
/var/log/mamonsu/agent.log {
daily
rotate 7
compress
missingok
notifempty
create 0640 mamonsu mamonsu
sharedscripts
postrotate
[ -e /var/run/mamonsu/mamonsu.pid ] && /etc/init.d/mamonsu restart >/dev/null
endscript
}

/var/log/mamonsu/mamonsu.log {
daily
rotate 7
Expand All @@ -20,15 +7,11 @@
create 0640 mamonsu mamonsu
sharedscripts
postrotate
[ -e /var/run/mamonsu/mamonsu.pid ] && /etc/init.d/mamonsu restart >/dev/null
if [ -d "/run/systemd/system" -a -x "/bin/systemctl" ]; then
/bin/systemctl condrestart mamonsu >/dev/null
else
/etc/init.d/mamonsu condrestart >/dev/null
fi
endscript
}

/var/log/mamonsu/localhost.log {
daily
rotate 7
compress
missingok
notifempty
create 0640 mamonsu mamonsu
}

0 comments on commit c85d5a4

Please sign in to comment.