Files
open5gs/configs/logrotate/open5gs.in
Oliver Smith be7d08bffc logrotate: fix reload failures
Do not attempt to run "systemctl reload" on the open5gs services, unless
they are running. This fixes the logrotate service failing on this
postrotate script, if units are not running or not installed.
2024-03-27 20:37:36 +09:00

17 lines
397 B
Plaintext

@localstatedir@/log/open5gs/*.log {
daily
sharedscripts
missingok
compress
rotate 14
create 640 open5gs open5gs
postrotate
for i in nrfd scpd seppd pcrfd hssd ausfd udmd udrd upfd sgwcd sgwud smfd mmed amfd; do
if systemctl --quiet is-active open5gs-$i; then
systemctl reload open5gs-$i
fi
done
endscript
}