mirror of
https://bitbucket.org/anguist/ntpa
synced 2026-09-26 02:42:26 +00:00
Updated documentation
This commit is contained in:
+21
-20
@@ -3,12 +3,13 @@
|
||||
# $FreeBSD
|
||||
#
|
||||
# PROVIDE: ntpa
|
||||
# REQUIRE: networking
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf to enable ntpa:
|
||||
# ntpa_enable (bool): Set to "NO" by default.
|
||||
# Set it to "YES" to enable munin-node
|
||||
# ntpa_config (path): Set to "/usr/local/etc/ntpa/ntpa.conf" by default.
|
||||
# Set it to "YES" to enable ntpa
|
||||
# ntpa_config (file): Set to "/usr/local/etc/ntpa/ntpa.conf" by default.
|
||||
# ntpa_tempdir (path): Set to "/tmp/" by default.
|
||||
#
|
||||
# Run additional instances of ntpa with:
|
||||
@@ -30,28 +31,28 @@ MONO="/usr/local/bin/mono"
|
||||
|
||||
ntpa_start()
|
||||
{
|
||||
if [ -f ${pidfile} ]; then
|
||||
rc_pid=`cat ${pidfile}`
|
||||
echo 1>&2 "${name} already running? (pid=$rc_pid)."
|
||||
return 1
|
||||
else
|
||||
echo "Starting ${name}."
|
||||
cd /usr/local/ntpa/
|
||||
${MONO} ntpa.exe --config ${config} --writepid ${pidfile} --temp ${tempdir} --daemon ${name} &
|
||||
fi
|
||||
if [ -f ${pidfile} ]; then
|
||||
rc_pid=`cat ${pidfile}`
|
||||
echo 1>&2 "${name} already running? (pid=$rc_pid)."
|
||||
return 1
|
||||
else
|
||||
echo "Starting ${name}."
|
||||
cd /usr/local/ntpa/
|
||||
${MONO} ntpa.exe --config ${config} --writepid ${pidfile} --temp ${tempdir} --daemon ${name} &
|
||||
fi
|
||||
}
|
||||
|
||||
ntpa_stop()
|
||||
{
|
||||
if [ ! -f ${pidfile} ]; then
|
||||
_run_rc_notrunning
|
||||
return 1
|
||||
else
|
||||
echo "Stopping ${name}."
|
||||
rc_pid=`cat ${pidfile}`
|
||||
kill -TERM $rc_pid
|
||||
wait_for_pids ${rc_pid}
|
||||
fi
|
||||
if [ ! -f ${pidfile} ]; then
|
||||
_run_rc_notrunning
|
||||
return 1
|
||||
else
|
||||
echo "Stopping ${name}."
|
||||
rc_pid=`cat ${pidfile}`
|
||||
kill -TERM $rc_pid
|
||||
wait_for_pids ${rc_pid}
|
||||
fi
|
||||
}
|
||||
|
||||
eval ": \${${name}_enable:=\"NO\"}"
|
||||
|
||||
Reference in New Issue
Block a user