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