This commit is contained in:
mofeng-git 2024-06-30 10:21:20 +08:00
parent 478053f92a
commit 7f364039ec
2 changed files with 13 additions and 0 deletions

View File

@ -34,6 +34,9 @@ kvmd:
long_press: long_press:
type: cmd type: cmd
cmd: [/usr/bin/sudo, onecloud_gpio.sh, long] cmd: [/usr/bin/sudo, onecloud_gpio.sh, long]
reset_press:
type: cmd
cmd: [/usr/bin/sudo, onecloud_gpio.sh, reset]
scheme: scheme:
wol_server1: wol_server1:
driver: wol_server1 driver: wol_server1
@ -50,6 +53,11 @@ kvmd:
pin: 0 pin: 0
mode: output mode: output
switch: false switch: false
reset_button:
driver: reset_press
pin: 0
mode: output
switch: false
view: view:
header: header:
title: 电源管理 title: 电源管理
@ -58,6 +66,7 @@ kvmd:
- [] - []
- ["#短按(开/关机):", short_button|按下] - ["#短按(开/关机):", short_button|按下]
- ["#长按(强制关机):", long_button|按下] - ["#长按(强制关机):", long_button|按下]
- ["#重启:", reset_button|按下]
- [] - []
- ["#网络唤醒"] - ["#网络唤醒"]
- ["#被控机设备", wol_server1|网络唤醒] - ["#被控机设备", wol_server1|网络唤醒]

View File

@ -8,6 +8,10 @@ case $1 in
gpioset -m time -s 5 gpiochip1 7=0 gpioset -m time -s 5 gpiochip1 7=0
gpioset gpiochip1 7=1 gpioset gpiochip1 7=1
;; ;;
reset)
gpioset -m time -s 1 gpiochip0 11=0
gpioset gpiochip0 11=1
;;
*) *)
echo "No thing." echo "No thing."
esac esac