mirror of
https://github.com/j-a-n/raspberrymatic-addon-rmupdate.git
synced 2023-10-10 13:37:40 +02:00
Add shutdown and reboot button
This commit is contained in:
parent
26aaea30bc
commit
8dba38b1ec
@ -463,6 +463,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
system_info: 'System information',
|
system_info: 'System information',
|
||||||
current_root_partiton: 'Current root partition: {{root_partition}}',
|
current_root_partiton: 'Current root partition: {{root_partition}}',
|
||||||
system_type: 'System type: {{system_type}}',
|
system_type: 'System type: {{system_type}}',
|
||||||
|
reboot_system: 'Reboot system',
|
||||||
|
shutdown_system: 'Shutdown system',
|
||||||
firmwares: 'Firmwares',
|
firmwares: 'Firmwares',
|
||||||
current_installed_version: 'Current installed version',
|
current_installed_version: 'Current installed version',
|
||||||
latest_available_version: 'Latest available version',
|
latest_available_version: 'Latest available version',
|
||||||
@ -516,6 +518,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
system_info: 'System-Informationen',
|
system_info: 'System-Informationen',
|
||||||
current_root_partiton: 'Aktuelle Root-Partition: {{root_partition}}',
|
current_root_partiton: 'Aktuelle Root-Partition: {{root_partition}}',
|
||||||
system_type: 'System-Typ: {{system_type}}',
|
system_type: 'System-Typ: {{system_type}}',
|
||||||
|
reboot_system: 'System neu starten',
|
||||||
|
shutdown_system: 'System herunterfahren',
|
||||||
firmwares: 'Firmwares',
|
firmwares: 'Firmwares',
|
||||||
current_installed_version: 'Momentan installierte Version',
|
current_installed_version: 'Momentan installierte Version',
|
||||||
latest_available_version: 'Aktuellste verfügbare Version',
|
latest_available_version: 'Aktuellste verfügbare Version',
|
||||||
@ -633,6 +637,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
</h2>
|
</h2>
|
||||||
<div class="ui list" id="system-info">
|
<div class="ui list" id="system-info">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="ui orange basic button" data-i18n="reboot_system" onclick="rest('POST', '/system_reboot');"></div>
|
||||||
|
<div class="ui red basic button" data-i18n="shutdown_system" onclick="rest('POST', '/system_shutdown');"></div>
|
||||||
|
|
||||||
<h2 class="ui header">
|
<h2 class="ui header">
|
||||||
<i class="settings icon"></i>
|
<i class="settings icon"></i>
|
||||||
|
@ -56,6 +56,12 @@ proc process {} {
|
|||||||
set system_type [rmupdate::get_rpi_version]
|
set system_type [rmupdate::get_rpi_version]
|
||||||
set root_partition [rmupdate::get_current_root_partition]
|
set root_partition [rmupdate::get_current_root_partition]
|
||||||
return "\{\"system_type\":\"${system_type}\",\"root_partition\":${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"} {
|
} elseif {[lindex $path 1] == "get_addon_info"} {
|
||||||
return [rmupdate::get_addon_info 1 1 1]
|
return [rmupdate::get_addon_info 1 1 1]
|
||||||
} elseif {[lindex $path 1] == "start_install_firmware"} {
|
} elseif {[lindex $path 1] == "start_install_firmware"} {
|
||||||
|
Loading…
Reference in New Issue
Block a user