aboutsummaryrefslogtreecommitdiffstats
path: root/testing/opennebula/opennebula.initd
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2013-06-11 20:23:38 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2013-06-11 20:23:38 +0000
commite9a1b8eec6a8c001bb8c5e84634210c28cf968f3 (patch)
tree4c59ce921a67723fcbc81022881b4e36394b99de /testing/opennebula/opennebula.initd
parent81370338320d126b7fed9422b2a623f887ecbb17 (diff)
downloadaports-e9a1b8eec6a8c001bb8c5e84634210c28cf968f3.tar.bz2
aports-e9a1b8eec6a8c001bb8c5e84634210c28cf968f3.tar.xz
testing/opennebula: new aport
Diffstat (limited to 'testing/opennebula/opennebula.initd')
-rw-r--r--testing/opennebula/opennebula.initd44
1 files changed, 44 insertions, 0 deletions
diff --git a/testing/opennebula/opennebula.initd b/testing/opennebula/opennebula.initd
new file mode 100644
index 0000000000..d80d3753d9
--- /dev/null
+++ b/testing/opennebula/opennebula.initd
@@ -0,0 +1,44 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+depend() {
+ after mysql
+}
+
+start() {
+ ebegin "Starting OpenNebula daemon"
+ start-stop-daemon \
+ --start \
+ --exec /usr/bin/oned \
+ --user ${USER}:${GROUP} \
+ -- ${ONED_OPTIONS}
+ eend $?
+
+ ebegin "Starting OpenNebula scheduler"
+ start-stop-daemon \
+ --start \
+ --exec /usr/bin/mm_sched \
+ --pidfile "${SCHED_PIDFILE}" \
+ --make-pidfile \
+ --background \
+ --user ${USER}:${GROUP} \
+ -- ${SCHED_OPTIONS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping OpenNebula daemon"
+ start-stop-daemon \
+ --stop \
+ --exec /usr/bin/oned
+ eend $?
+
+ ebegin "Stopping OpenNebula scheduler"
+ start-stop-daemon \
+ --stop \
+ --exec /usr/bin/mm_sched \
+ --pidfile "${SCHED_PIDFILE}"
+ eend $?
+}