mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-26 01:20:27 +00:00
Initial commit
This commit is contained in:
parent
7e6a8f35af
commit
d3e0aca3d7
1 changed files with 16 additions and 0 deletions
16
installers/configport.sh
Executable file
16
installers/configport.sh
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Updates lighttpd server.port and restarts the service in a predictable manner
|
||||||
|
|
||||||
|
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
|
||||||
|
server_port=$1
|
||||||
|
lighttpd_conf=$2
|
||||||
|
host=$3
|
||||||
|
|
||||||
|
echo "Changing lighttpd server.port to $server_port..."
|
||||||
|
sed -i "s/^\(server\.port *= *\)[0-9]*/\1$server_port/g" "$lighttpd_conf"
|
||||||
|
|
||||||
|
echo "RaspAP will now be available at $host:$server_port"
|
||||||
|
echo "Restarting lighttpd in 5 seconds..."
|
||||||
|
sleep 5
|
||||||
|
systemctl restart lighttpd.service
|
Loading…
Reference in a new issue