summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-libs/xrootd/files/cmsd.initd')
-rw-r--r--net-libs/xrootd/files/cmsd.initd35
1 files changed, 35 insertions, 0 deletions
diff --git a/net-libs/xrootd/files/cmsd.initd b/net-libs/xrootd/files/cmsd.initd
new file mode 100644
index 000000000000..eb8b4470b345
--- /dev/null
+++ b/net-libs/xrootd/files/cmsd.initd
@@ -0,0 +1,35 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+. /etc/conf.d/xrootd
+
+depend() {
+ need net
+ use logger dns
+ provide root-file-server
+}
+
+start_pre() {
+ checkpath -q -d -m 0755 -o xrootd:xrootd /var/run/spool
+ checkpath -q -d -m 0755 -o xrootd:xrootd /var/run/xrootd
+}
+
+start() {
+ ebegin "Starting Cluster Management Service daemon"
+ start-stop-daemon --start --quiet --user ${XROOTD_USER} \
+ --make-pidfile --pidfile /var/run/${RC_SVCNAME}.pid \
+ --exec /usr/bin/${RC_SVCNAME} --background -- \
+ -c ${XROOTD_CONF} -l ${XROOTD_LOGDIR}/${RC_SVCNAME}.log \
+ ${CMSD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Cluster Management Service daemon"
+ start-stop-daemon --stop --quiet \
+ --pidfile /var/run/${RC_SVCNAME}.pid \
+ --exec /usr/bin/${RC_SVCNAME}
+ eend $?
+}