diff options
Diffstat (limited to 'testing/odyssey/odyssey.initd')
-rw-r--r-- | testing/odyssey/odyssey.initd | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/testing/odyssey/odyssey.initd b/testing/odyssey/odyssey.initd new file mode 100644 index 00000000000..967c5bd2424 --- /dev/null +++ b/testing/odyssey/odyssey.initd @@ -0,0 +1,39 @@ +#!/sbin/openrc-run + +depend() { + use net + after postgresql +} + +get_config() { + [ -f "${CONFFILE}" ] || eend 1 "'${CONFFILE}' not found" +} + +start() { + ebegin "Starting Odyssey" + get_config + local ret=$? + if [ $ret -ne 0 ] ; then + eend $ret + exit $ret + fi + start-stop-daemon --start \ + --pidfile ${PIDFILE} \ + --user odyssey -b -m \ + --exec /usr/bin/odyssey -- "${CONFFILE}" + eend $? +} + +stop() { + ebegin "Stopping Odyssey" + start-stop-daemon --stop \ + --pidfile ${PIDFILE} + eend $? +} + +reload() { + ebegin "Reloading Odyssey configuration from '${CONFFILE}'" + start-stop-daemon --signal HUP --pidfile ${PIDFILE} + eend $? +} + |