mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-25 06:10:20 +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
1 changed files with 5 additions and 0 deletions
|
@ -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 a new issue