mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
ntpd: only restart ntpd when the wan interface comes up and ntpd is enabled
Signed-off-by: Peter Wagner <tripolar@gmx.at>
This commit is contained in:
@@ -1,10 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
NAME=ntpd
|
NAME=ntpd
|
||||||
CONFIG=/etc/ntp.conf
|
COMMAND=/etc/init.d/$NAME
|
||||||
COMMAND=/sbin/$NAME
|
|
||||||
|
|
||||||
[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && {
|
[ "$ACTION" = "ifup" -a "$INTERFACE" = "wan" ] && {
|
||||||
[ -x $COMMAND ] && [ -r $CONFIG ] && {
|
$COMMAND enabled && {
|
||||||
killall ntpd
|
killall ntpd
|
||||||
/etc/init.d/ntpd start
|
$COMMAND start
|
||||||
} &
|
} &
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user