diff options
author | Mika Havela <mika.havela@gmail.com> | 2010-01-01 21:30:50 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-01-05 13:11:24 +0000 |
commit | dceab94dac458d2c90f16581a2816b539352342a (patch) | |
tree | 1375e6d57d1c2b3343e61aecd48e921cf4914d5d /testing/cherokee/cherokee.initd | |
parent | 631ec650573e7d81865caf6fd7b94320845c1173 (diff) | |
download | aports-dceab94dac458d2c90f16581a2816b539352342a.tar.bz2 aports-dceab94dac458d2c90f16581a2816b539352342a.tar.xz |
cherokee: New APKBUILD for cherokee web server http://www.cherokee-project.com/
Diffstat (limited to 'testing/cherokee/cherokee.initd')
-rwxr-xr-x | testing/cherokee/cherokee.initd | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/testing/cherokee/cherokee.initd b/testing/cherokee/cherokee.initd new file mode 100755 index 0000000000..6aed337b6f --- /dev/null +++ b/testing/cherokee/cherokee.initd @@ -0,0 +1,41 @@ +#!/sbin/runscript + +# Cherokee init.d file for alpine linux. + +NAME=cherokee +DAEMON=/usr/sbin/$NAME +DAEMON_USER=${DAEMON_USER:-root} +DAEMON_GROUP=${DAEMON_GROUP:-root} + +depend() { + need net +} + +start() { + ebegin "Starting ${NAME}" + start-stop-daemon --start --quiet \ + --pidfile /var/run/${NAME}.pid \ + --chuid ${DAEMON_USER}:${DAEMON_GROUP} \ + --exec ${DAEMON} -- ${OPTS} + eend $? +} + +stop() { + ebegin "Stopping ${NAME}" + start-stop-daemon --stop --quiet \ + --exec ${DAEMON} \ + --pidfile /var/run/${NAME}.pid + eend $? +} + +reload() { + ebegin "Reloading ${NAME}" + if ! service_started "${NAME}" ; then + eend 1 "${NAME} is not started" + return 1 + fi + start-stop-daemon --stop --oknodo --signal HUP \ + --exec ${DAEMON} --pidfile /var/run/${NAME}.pid + eend $? +} + |