summarylogtreecommitdiffstats
path: root/rootd
diff options
context:
space:
mode:
authorScott Lawrence2015-07-04 14:24:19 -0400
committerScott Lawrence2015-07-04 14:24:19 -0400
commit019e035fa7920788f7537347842b36d0ee212a74 (patch)
tree327d685deb83342894c11dac2a727980e0af2513 /rootd
downloadaur-019e035fa7920788f7537347842b36d0ee212a74.tar.gz
Initial aur4 import
Diffstat (limited to 'rootd')
-rw-r--r--rootd37
1 files changed, 37 insertions, 0 deletions
diff --git a/rootd b/rootd
new file mode 100644
index 000000000000..fb2c3388ca24
--- /dev/null
+++ b/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