call chronyc directly from logrotate and NM dispatcher scripts
This commit is contained in:
parent
29a27a56ba
commit
22ea5da1ab
@ -3,6 +3,6 @@
|
||||
nocreate
|
||||
sharedscripts
|
||||
postrotate
|
||||
/usr/libexec/chrony-helper command cyclelogs > /dev/null 2>&1 || true
|
||||
/usr/bin/chronyc -a cyclelogs > /dev/null 2>&1 || true
|
||||
endscript
|
||||
}
|
||||
|
@ -4,12 +4,12 @@ export LC_ALL=C
|
||||
|
||||
if [ "$2" = "up" ]; then
|
||||
/sbin/ip route list dev "$1" | grep -q '^default' &&
|
||||
/usr/libexec/chrony-helper command online > /dev/null 2>&1
|
||||
/usr/bin/chronyc -a online > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [ "$2" = "down" ]; then
|
||||
/sbin/ip route list | grep -q '^default' ||
|
||||
/usr/libexec/chrony-helper command offline > /dev/null 2>&1
|
||||
/usr/bin/chronyc -a offline > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user