Commit | Line | Data |
---|---|---|
209feeb0 H |
1 | #!/bin/sh |
2 | ||
3 | bind='80'; | |
4 | root='/srv/http'; | |
5 | conf='/etc/busybox/httpd.conf'; | |
6 | user='http:http'; | |
7 | realm='Protected Area'; | |
8 | log='/var/log/busybox-httpd.log'; | |
9 | pidfile='/var/run/busybox-httpd.pid'; | |
10 | . /etc/busybox/httpd-rc.conf | |
11 | ||
12 | if [ ! -z "$1" ]; then | |
13 | pidfile="$1"; | |
14 | fi; | |
15 | ||
16 | echo -e "\n[!] HTTPd restarted: $(date -R)" >> "$log"; | |
17 | ||
18 | /bin/busybox httpd \ | |
19 | -f -vv \ | |
20 | -p "$bind" \ | |
21 | -h "$root" \ | |
22 | -c "$conf" \ | |
23 | -u "$user" \ | |
24 | -r "$realm" \ | |
25 | >> "$log" 2>&1 & | |
26 | ||
27 | echo "$!" > "$pidfile"; |