File: thttpd_wrapper

package info (click to toggle)
thttpd 2.23beta1-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 684 kB
  • ctags: 679
  • sloc: ansic: 7,908; sh: 1,871; makefile: 310
file content (18 lines) | stat: -rwxr-xr-x 507 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
#
# thttpd_wrapper - wrapper script for thttpd on FreeBSD
#
# This goes in /usr/local/sbin.  It runs thttpd in a loop.  If thttpd
# exits then the script restarts it automatically.
#
# The -D flag tells thttpd to *not* put itself into the background,
# and the -C flag tells it to get the rest of its configuration from
# the specified config file.

while true ; do
    /usr/local/sbin/thttpd -D -C /usr/local/www/thttpd_config
    if [ -f /var/run/nologin ] ; then
	exit
    fi
    sleep 10
done