bd95f01f41
Bump revision. --HG-- extra : convert_revision : 60243522b1e09709725cf12e8a9d641f712b84b2
13 lines
243 B
Bash
13 lines
243 B
Bash
#!/bin/sh
|
|
#
|
|
# Restarts ntpd if no connected peers are found.
|
|
#
|
|
ntpq_cmd=/usr/bin/ntpq
|
|
ntpd_initd=/etc/init.d/ntpd
|
|
|
|
if [ ! -x $ntpq_cmd -o ! -x $ntpd_initd ]; then
|
|
exit 0
|
|
fi
|
|
|
|
$ntpq_cmd -np | grep '^\*' >/dev/null || (/etc/init.d/ntpd restart)
|