mirror of
https://git.fsfe.org/FSFE/fsfe-local-build.git
synced 2026-04-20 11:23:06 +02:00
adding option to use python simplehttp webserver module which doesn't require users to install lighttpd
This commit is contained in:
@@ -110,11 +110,25 @@ fi
|
||||
|
||||
|
||||
### START WEBSERVER if necessary
|
||||
if [ ! $(pgrep lighttpd) ]; then
|
||||
echo "[INFO] Starting webserver"
|
||||
/usr/sbin/lighttpd -f $HTTPD_conf
|
||||
else
|
||||
echo "[INFO] Webserver already seems to be running."
|
||||
if [ "$HTTPD" == "python" ]; then # python
|
||||
if [ ! $(pgrep -f "pywebserver-fsfe.py $LOC_out") ]; then
|
||||
echo "[INFO] Starting $HTTPD webserver"
|
||||
nohup "$ROOT/pywebserver-fsfe.py" "$LOC_out" "$HTTPD_port" > "$ROOT"/pywebserver-fsfe.log 2>&1 &
|
||||
else
|
||||
echo "[INFO] $HTTPD webserver already seems to be running."
|
||||
fi
|
||||
elif [ "$HTTPD" == "lighttpd" ]; then
|
||||
if [ ! $(pgrep lighttpd) ]; then # lighttpd
|
||||
echo "[INFO] Starting $HTTPD webserver"
|
||||
/usr/sbin/lighttpd -f "$HTTPD_conf"
|
||||
else
|
||||
echo "[INFO] $HTTPD webserver already seems to be running."
|
||||
fi
|
||||
elif [ "$HTTPD" == "" ]; then # empty variable
|
||||
echo "[ERROR] No webserver specified. Please define variable HTTPD in config.cfg. Aborting now."
|
||||
exit 1
|
||||
else # something custom
|
||||
echo "[WARNING] Unknown webserver defined. Please check variable HTTPD in config.cfg."
|
||||
fi
|
||||
|
||||
### SHOW RESULTS
|
||||
|
||||
Reference in New Issue
Block a user