Réécriture : Organisme/* -> Société/ .
[cyclowiki.git] / thttpd
1 #!/bin/sh -eu
2 # DESCRIPTION: run thttpd(1) webserver for ikiwiki(1)
3 # SYNTAX:
4
5 # ACTION: initialize from ./
6 test -L "$0" && tool="$(readlink -e "$0")" || tool=$0
7 tool=$(readlink -e "${tool%/*}"/.)
8 root="$tool"
9 # ACTION: run thttpd
10 pid=
11 trap 'sudo pkill -P $pid' INT
12 set -x
13 sudo thttpd \
14 -D \
15 -T UTF-8 \
16 -c '/cgi/*.cgi' \
17 -d "${root%/*}"/"${root##*/}"-www \
18 -h ${host:-127.0.0.2} \
19 -l /dev/stderr \
20 -p 80 \
21 -u "$USER" \
22 "$@" &
23 set +x
24 pid=$!
25 while read -r _
26 do :
27 done