diff options
author | root <root@rshg054.dnsready.net> | 2012-01-27 23:15:06 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-01-27 23:15:06 +0000 |
commit | 2493f16093b14a81e949bd6a1b89724cb931807d (patch) | |
tree | b93ed56dddfb9e067d0e29e363bc8e98286b9ac8 /community-staging/root/rootd | |
parent | 3741146d50cb93e8985f8aac937e36d35ee76446 (diff) |
Fri Jan 27 23:15:06 UTC 2012
Diffstat (limited to 'community-staging/root/rootd')
-rw-r--r-- | community-staging/root/rootd | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/community-staging/root/rootd b/community-staging/root/rootd new file mode 100644 index 000000000..fb2c3388c --- /dev/null +++ b/community-staging/root/rootd @@ -0,0 +1,37 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +PID=`pidof -o %PPID /usr/sbin/rootd` +case "$1" in + start) + stat_busy "Starting ROOT file server daemon" + [ -z "$PID" ] && /usr/bin/rootd >>/var/log/root.log 2>&1 + if [ $? -gt 0 ]; then + stat_fail + else + PID=`pidof -o %PPID /usr/sbin/rootd` + echo $PID >/var/run/rootd.pid + add_daemon rootd + stat_done + fi + ;; + stop) + stat_busy "Stopping ROOT file server daemon" + [ ! -z "$PID" ] && kill $PID &>/dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon rootd + stat_done + fi + ;; + restart) + $0 stop + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 |