Add fix logrotate script.
This commit is contained in:
parent
a60a556f9c
commit
4ff3326812
|
@ -0,0 +1,4 @@
|
||||||
|
sudo sed -i 's/-SIGUSR1/-USR1/g' /etc/logrotate.d/orbit
|
||||||
|
line_num=`grep '/var/log/mongodb/\*.log' /etc/logrotate.d/orbit -n | cut -d : -f 1`
|
||||||
|
end_num_plus=`cat /etc/logrotate.d/orbit | awk '{if (NR>='$line_num') print}'|grep '}' -n|cut -d : -f 1`
|
||||||
|
sudo sed -i $line_num,+$((end_num_plus-1))'s/copytruncate/create 644 mongodb mongodb/g' /etc/logrotate.d/orbit
|
Loading…
Reference in New Issue