mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-24 13:50:17 +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(){
|
||||
|
||||
nohup bash -c "sleep 5; reboot" &> /dev/null </dev/null &
|
||||
|
@ -456,6 +460,7 @@ main() {
|
|||
"setdns" ) SetDNSServers;;
|
||||
"setexcludedomains" ) SetExcludeDomains;;
|
||||
"setexcludeclients" ) SetExcludeClients;;
|
||||
"halt" ) Halt;;
|
||||
"reboot" ) Reboot;;
|
||||
"restartdns" ) RestartDNS;;
|
||||
"setquerylog" ) SetQueryLogOptions;;
|
||||
|
|
Loading…
Reference in a new issue