aboutsummaryrefslogtreecommitdiffstats
path: root/main/chrony/chronyd.initd
diff options
context:
space:
mode:
Diffstat (limited to 'main/chrony/chronyd.initd')
-rw-r--r--main/chrony/chronyd.initd15
1 files changed, 8 insertions, 7 deletions
diff --git a/main/chrony/chronyd.initd b/main/chrony/chronyd.initd
index cc99e5cdf9..1b8b9a42af 100644
--- a/main/chrony/chronyd.initd
+++ b/main/chrony/chronyd.initd
@@ -3,8 +3,9 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/chrony/files/chronyd.rc,v 1.8 2007/03/22 14:32:09 tove Exp $
+command="/usr/sbin/chronyd"
description="NTP daemon"
-PIDFILE="/var/run/chrony/chronyd.pid"
+pidfile="/var/run/chrony/chronyd.pid"
depend() {
need net
@@ -33,9 +34,9 @@ checkconfig() {
# Actually, I tried it, and chrony seems to ignore the pidfile
# option. I'm going to leave it here anyway, since you never
# know if it might be handy
- _cfg_PIDFILE=`awk '/^ *pidfile/{print $2}' "${CFGFILE}"`
- if [ -n "$_cfg_PIDFILE" ] ; then
- PIDFILE="$_cfg_PIDFILE"
+ _cfg_pidfile=`awk '/^ *pidfile/{print $2}' "${CFGFILE}"`
+ if [ -n "$_cfg_pidfile" ] ; then
+ pidfile="$_cfg_pidfile"
fi
fi
return 0
@@ -61,8 +62,8 @@ start() {
ebegin "Starting chronyd"
start-stop-daemon $daemon_args --start --quiet \
- --exec /usr/sbin/chronyd \
- --pidfile "${PIDFILE}" \
+ --exec "${command}" \
+ --pidfile "${pidfile}" \
-- -f "${CFGFILE}" ${ARGS}
eend $? "Failed to start chronyd"
}
@@ -72,6 +73,6 @@ stop() {
ebegin "Stopping chronyd"
start-stop-daemon --stop --quiet \
- --pidfile "${PIDFILE}"
+ --pidfile "${pidfile}"
eend $? "Failed to stop chronyd"
}