mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-29 20:45:13 +08:00
🤞 Sync 2026-04-23 06:19:46
This commit is contained in:
1 parent
a1df15cd3d
commit
b86d032e91
250 files changed
+41507
-188
No files matched your search
Executable
+38
@@ -0,0 +1,38 @@
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=svcontrol
|
||||
PKG_VERSION:=1
|
||||
PKG_RELEASE:=1
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/svcontrol
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/svcontrol
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Supervisor control
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/svcontrol/description
|
||||
This package contains a utility
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/svcontrol/install
|
||||
$(INSTALL_DIR) $(1)/bin
|
||||
$(INSTALL_BIN) ./files/svcontrol $(1)/bin/
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/svcontrol.init $(1)/etc/init.d/svcontrol
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,svcontrol))
|
||||
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo 506 > /sys/class/gpio/export
|
||||
|
||||
while sleep 5; do
|
||||
temp=$(cat /sys/bus/i2c/devices/0-0011/temp)
|
||||
if [[ "$?" -ne "0" ]]; then
|
||||
sleep 5
|
||||
temp=$(cat /sys/bus/i2c/devices/0-0011/temp)
|
||||
if [[ "$?" -ne "0" ]]; then
|
||||
echo "gd3x: svcontrol: i2c communication lost, sv will reboot" > /dev/kmsg
|
||||
echo high > /sys/class/gpio/gpio506/direction
|
||||
sleep 1
|
||||
echo low > /sys/class/gpio/gpio506/direction
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
exit 0
|
||||
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=20
|
||||
USE_PROCD=1
|
||||
PROG=/bin/svcontrol
|
||||
|
||||
start_service() {
|
||||
procd_open_instance
|
||||
procd_set_param command "$PROG" "$1"
|
||||
|
||||
procd_set_param stdout 1
|
||||
procd_set_param stderr 1
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
Reference in new issue
Block a user