From ccf91f5b973e5433ba94dd02de35600513a750de Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Thu, 8 Sep 2011 21:35:08 +0200 Subject: app-admin/shellinabox: added ebuild --- app-admin/shellinabox/files/shellinabox-init | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 app-admin/shellinabox/files/shellinabox-init (limited to 'app-admin/shellinabox/files/shellinabox-init') diff --git a/app-admin/shellinabox/files/shellinabox-init b/app-admin/shellinabox/files/shellinabox-init new file mode 100644 index 0000000..ac27e44 --- /dev/null +++ b/app-admin/shellinabox/files/shellinabox-init @@ -0,0 +1,32 @@ +#!/sbin/runscript +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/files/sshd.rc6,v 1.27 2009/08/12 08:09:52 idl0r Exp $ + +depend() { + use logger dns + need net +} + +SHELLINABOXD_PIDFILE=${SHELLINABOXD_PIDFILE:-/var/run/${SVCNAME}.pid} +SHELLINABOXD_BINARY=${SHELLINABOXD_BINARY:-/usr/bin/shellinaboxd} +SHELLINABOXD_DATADIR="${SHELLINABOXD_DATADIR:-/var/lib/shellinabox}" +SHELLINABOXD_PORT="${SHELLINABOXD_PORT:-4200}" + +start() { + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --oknodo --exec "${SHELLINABOXD_BINARY}" \ + --pidfile "${SHELLINABOXD_PIDFILE}" \ + -- -q --background="${SHELLINABOXD_PIDFILE}" --disable-ssl-menu \ + --user=shellinabox --group=shellinabox \ + --cert="${SHELLINABOXD_DATADIR}" --port="${SHELLINABOXD_PORT}" \ + ${SHELLINABOXD_OPTS} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --exec "${SHELLINABOXD_BINARY}" \ + --pidfile "${SHELLINABOXD_PIDFILE}" --quiet + eend $? +} -- cgit v1.2.3