mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-03 12:40:56 +00:00
Update webpage.sh
Implement "Halt system" button, next to "Restart system" button, on admin/settings page. Useful for doing clean shutdown before powering off. (This affects 4 files, 3 for the web content, 1 for backend script.) Gilbert Detillieux <gedetil> 2017-04-11
This commit is contained in:
parent
1d64b614c7
commit
ff6df76e36
@ -211,6 +211,10 @@ SetExcludeClients(){
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Halt(){
|
||||||
|
nohup bash -c "sleep 5; halt" &> /dev/null </dev/null &
|
||||||
|
}
|
||||||
|
|
||||||
Reboot(){
|
Reboot(){
|
||||||
|
|
||||||
nohup bash -c "sleep 5; reboot" &> /dev/null </dev/null &
|
nohup bash -c "sleep 5; reboot" &> /dev/null </dev/null &
|
||||||
@ -456,6 +460,7 @@ main() {
|
|||||||
"setdns" ) SetDNSServers;;
|
"setdns" ) SetDNSServers;;
|
||||||
"setexcludedomains" ) SetExcludeDomains;;
|
"setexcludedomains" ) SetExcludeDomains;;
|
||||||
"setexcludeclients" ) SetExcludeClients;;
|
"setexcludeclients" ) SetExcludeClients;;
|
||||||
|
"halt" ) Halt;;
|
||||||
"reboot" ) Reboot;;
|
"reboot" ) Reboot;;
|
||||||
"restartdns" ) RestartDNS;;
|
"restartdns" ) RestartDNS;;
|
||||||
"setquerylog" ) SetQueryLogOptions;;
|
"setquerylog" ) SetQueryLogOptions;;
|
||||||
|
Loading…
Reference in New Issue
Block a user