mirror of
				https://github.com/billz/raspap-webgui.git
				synced 2025-03-01 10:31:47 +00:00 
			
		
		
		
	Add/update save server.bind option
This commit is contained in:
		| @@ -33,11 +33,20 @@ if [ "$restart_service" = 1 ]; then | |||||||
|     echo "Restarting lighttpd in 3 seconds..." |     echo "Restarting lighttpd in 3 seconds..." | ||||||
|     sleep 3 |     sleep 3 | ||||||
|     systemctl restart lighttpd.service |     systemctl restart lighttpd.service | ||||||
| else | fi | ||||||
|  | if [ -n "$server_port" ]; then | ||||||
|     echo "Changing lighttpd server.port to $server_port ..." |     echo "Changing lighttpd server.port to $server_port ..." | ||||||
|     sed -i "s/^\(server\.port *= *\)[0-9]*/\1$server_port/g" "$lighttpd_conf" |     sed -i "s/^\(server\.port *= *\)[0-9]*/\1$server_port/g" "$lighttpd_conf" | ||||||
|  |  | ||||||
|     echo "RaspAP will now be available at $host:$server_port" |     echo "RaspAP will now be available at $host:$server_port" | ||||||
|     echo "Restart lighttpd for new setting to take effect" |     echo "Restart lighttpd for new setting to take effect" | ||||||
| fi | fi | ||||||
|  | if [ -n "$server_bind" ]; then | ||||||
|  |     echo "Changing lighttpd server.bind to $server_bind ..." | ||||||
|  |     grep -q 'server.bind' "$lighttpd_conf" && \ | ||||||
|  |         sed -i "s/^\(server\.bind.*= \)\".*\"*/\1\"$server_bind\"/g" "$lighttpd_conf" || \ | ||||||
|  |         printf "server.bind \t\t\t\t = \"$server_bind\"" >> "$lighttpd_conf" | ||||||
|  |     echo "RaspAP will now be available at $server_bind" | ||||||
|  |     echo "Restart lighttpd for new setting to take effect" | ||||||
|  | fi | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user