forked from acouzens/open5gs
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.
This commit is contained in:
parent
581d255c53
commit
be7d08bffc
|
@ -8,7 +8,9 @@
|
|||
|
||||
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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue