1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-14 11:31:51 +00:00

Separate watchdog and modem init for z8102

This commit is contained in:
Ycarus (Yannick Chabanois) 2023-11-15 16:28:39 +01:00
parent a5e026d6eb
commit a4cd28a5d1
3 changed files with 20 additions and 6 deletions

View file

@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=z8102
PKG_VERSION:=0.1
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_MAINTAINER:=Yannick Chabanois <contact@openmptcprouter.com>
@ -31,8 +31,6 @@ endef
define Package/z8102/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,z8102))

View file

@ -41,7 +41,4 @@ start_service()
# run modem 2
i=460
echo "1" > /sys/class/gpio/gpio${i}/value
# watchdog
/usr/lib/custom/wdg.sh &
}

View file

@ -0,0 +1,19 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2013 OpenWrt.org
# Copyright (C) 2023 Yannick Chabanois (Ycarus) for OpenMPTCProuter
START=30
USE_PROCD=1
log() {
logger -t "z8102-wdg" "$@"
}
start_service()
{
# watchdog
procd_open_instance
procd_set_param command /usr/lib/custom/wdg.sh
procd_set_param respawn
procd_close_instance
}