Skip to content

Commit c85d5a4

Browse files
committed
build: update logrotate rules
- fix mamonsu log path for default rule - remove deprecated rules
1 parent 0190077 commit c85d5a4

File tree

1 file changed

+5
-22
lines changed

1 file changed

+5
-22
lines changed
Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
1-
/var/log/mamonsu/agent.log {
2-
daily
3-
rotate 7
4-
compress
5-
missingok
6-
notifempty
7-
create 0640 mamonsu mamonsu
8-
sharedscripts
9-
postrotate
10-
[ -e /var/run/mamonsu/mamonsu.pid ] && /etc/init.d/mamonsu restart >/dev/null
11-
endscript
12-
}
13-
141
/var/log/mamonsu/mamonsu.log {
152
daily
163
rotate 7
@@ -20,15 +7,11 @@
207
create 0640 mamonsu mamonsu
218
sharedscripts
229
postrotate
23-
[ -e /var/run/mamonsu/mamonsu.pid ] && /etc/init.d/mamonsu restart >/dev/null
10+
if [ -d "/run/systemd/system" -a -x "/bin/systemctl" ]; then
11+
/bin/systemctl condrestart mamonsu >/dev/null
12+
else
13+
/etc/init.d/mamonsu condrestart >/dev/null
14+
fi
2415
endscript
2516
}
2617

27-
/var/log/mamonsu/localhost.log {
28-
daily
29-
rotate 7
30-
compress
31-
missingok
32-
notifempty
33-
create 0640 mamonsu mamonsu
34-
}

0 commit comments

Comments
 (0)