mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-09-11 02:44:57 +08:00
🤞 Sync 2026-04-23 06:19:46
This commit is contained in:
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=11
|
||||
USE_PROCD=1
|
||||
PROG=/bin/event-handler
|
||||
|
||||
start_service() {
|
||||
touch /etc/event_log
|
||||
poe_gpio="$(uci -q get event-handler.@event-handler[0].poe_gpio)"
|
||||
echo $poe_gpio > /sys/class/gpio/export
|
||||
usb_gpio="$(uci -q get event-handler.@event-handler[0].usb_gpio)"
|
||||
echo $usb_gpio > /sys/class/gpio/export
|
||||
heat_gpio="$(uci -q get event-handler.@event-handler[0].heat_gpio)"
|
||||
echo $heat_gpio > /sys/class/gpio/export
|
||||
wd_gpio="$(uci -q get event-handler.@event-handler[0].wd_gpio)"
|
||||
echo $wd_gpio > /sys/class/gpio/export
|
||||
procd_open_instance
|
||||
procd_set_param command "$PROG"
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
Reference in New Issue
Block a user