updated on Thu Jan 19 16:10:29 UTC 2012
[aur-mirror.git] / fnord / run
blob35e4f1b692eb47832bf66849c5e865d4d1d07be7
1 #!/bin/sh
3 exec 2>&1
5 cd /home/fnord
7 if [ -d rules ]
8 then
9 ipsvd-cdb rules.cdb rules.tmp rules
10 RULES="-x rules.cdb"
11 else
12 RULES=""
15 readdefault() {
16 var=$1; shift
17 if [ -s config/$var ]
18 then
19 export $var="`head -1 config/$var`"
20 else
21 export $var="$*"
25 readdefault concurrency 30
26 readdefault program fnord-idx
27 readdefault memory 3000000
28 readdefault port 8000
29 readdefault bind 0.0.0.0
31 exec chpst -m${memory} -u fnord \
32 tcpsvd ${RULES} -v ${bind} ${port} \
33 ${program}