Skip to content

Instantly share code, notes, and snippets.

@jan-matejka
Created September 27, 2012 22:35
Show Gist options
  • Select an option

  • Save jan-matejka/3796858 to your computer and use it in GitHub Desktop.

Select an option

Save jan-matejka/3796858 to your computer and use it in GitHub Desktop.
#
# This file is read by the thttpd init script.
#
#
# If you wish thttpd to start, globally, the change ENABLED to "yes"
#
ENABLED=no
#!/bin/sh
### BEGIN INIT INFO
# Provides: thttpd
# Required-Start: $network $remote_fs
# Required-Stop: $network $remote_fs
# Should-Start:
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts tiny/turbo/throttling HTTP server
# Description: thttpd is a small, fast secure webserver.
### END INIT INFO
set -x
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/thttpd
DESC="web server"
NAME=thttpd
DEFAULTS=/etc/default/thttpd
CONFFILE=/etc/thttpd/thttpd.conf
PIDFILE=/var/run/thttpd.pid
OPTIONS="-C $CONFFILE -i $PIDFILE"
test -x $DAEMON || exit 0
test -f $CONFFILE || exit 1
#
# Read the defaults file if present
#
if [ -s $DEFAULTS ]; then
. $DEFAULTS
if [ "x$ENABLED" != "xyes" ]; then
exit 0
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment