mirror of
https://github.com/kneutron/ansitest.git
synced 2025-01-16 04:42:55 +08:00
if root run on port 80
This commit is contained in:
parent
eeb2028f03
commit
6fbf61aae8
@ -6,5 +6,13 @@
|
|||||||
# REF: https://www.perlmonks.org/?node_id=865148
|
# REF: https://www.perlmonks.org/?node_id=865148
|
||||||
# REF: https://www.w3.org/Daemon/User/Installation/PrivilegedPorts.html#:~:text=Priviliged%20ports,has%20put%20up%20for%20you.
|
# REF: https://www.w3.org/Daemon/User/Installation/PrivilegedPorts.html#:~:text=Priviliged%20ports,has%20put%20up%20for%20you.
|
||||||
|
|
||||||
python -m SimpleHTTPServer 80 > ~/simple-web-server.log 2>&1
|
runport=8080
|
||||||
|
|
||||||
|
##Check for root priviliges
|
||||||
|
if [ "$(id -u)" -ne 0 ]; then
|
||||||
|
runport=80
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "$0 running on port $runport"
|
||||||
|
python -m SimpleHTTPServer $runport > ~/simple-web-server.log 2>&1
|
||||||
date
|
date
|
||||||
|
Loading…
x
Reference in New Issue
Block a user