13 lines
222 B
Bash
13 lines
222 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
if [ "$EUID" -ne 0 ]
|
||
|
then echo "Please run as root"
|
||
|
exit
|
||
|
fi
|
||
|
|
||
|
LOCALIP=$(hostname -I)
|
||
|
|
||
|
echo "Starting server. Press CTRL+C to stop."
|
||
|
echo -e "Local IP address: \e[32m$LOCALIP\e[0m"
|
||
|
|
||
|
python3 -m http.server 80
|