diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /www-servers/thttpd/files/thttpd.init.1 |
reinit the tree, so we can have metadata
Diffstat (limited to 'www-servers/thttpd/files/thttpd.init.1')
-rw-r--r-- | www-servers/thttpd/files/thttpd.init.1 | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/www-servers/thttpd/files/thttpd.init.1 b/www-servers/thttpd/files/thttpd.init.1 new file mode 100644 index 000000000000..3b7756eae19a --- /dev/null +++ b/www-servers/thttpd/files/thttpd.init.1 @@ -0,0 +1,34 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v3 or later + +depend() { + need net + use dns logger netmount + after sshd +} + +checkconfig() { + if [ ! -d "$THTTPD_DOCROOT" ]; then + eend 1 "THTTPD_DOCROOT not set correctly in /etc/conf.d/${SVCNAME}" + fi +} + +start() { + ebegin "Starting ${SVCNAME}" + + checkconfig || return 1 + + start-stop-daemon --quiet --start --exec /usr/sbin/thttpd \ + --pidfile /var/run/${SVCNAME}.pid --chdir "$THTTPD_DOCROOT" -- \ + -i /var/run/${SVCNAME}.pid \ + -l /var/log/${SVCNAME}.log \ + ${THTTPD_OPTS} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --quiet --stop --pidfile /var/run/${SVCNAME}.pid + eend $? +} |