1
0
mirror of https://github.com/j-a-n/raspberrymatic-addon-rmupdate.git synced 2023-10-10 11:37:40 +00:00

Add shutdown and reboot button

This commit is contained in:
Jan Schneider
2018-02-08 22:53:02 +01:00
parent 26aaea30bc
commit 8dba38b1ec
2 changed files with 12 additions and 0 deletions

View File

@@ -56,6 +56,12 @@ proc process {} {
set system_type [rmupdate::get_rpi_version]
set root_partition [rmupdate::get_current_root_partition]
return "\{\"system_type\":\"${system_type}\",\"root_partition\":${root_partition}\}"
} elseif {[lindex $path 1] == "system_reboot"} {
exec /sbin/reboot
return "\"reboot initiated\""
} elseif {[lindex $path 1] == "system_shutdown"} {
exec /sbin/shutdown
return "\"shutdown initiated\""
} elseif {[lindex $path 1] == "get_addon_info"} {
return [rmupdate::get_addon_info 1 1 1]
} elseif {[lindex $path 1] == "start_install_firmware"} {