Create a sample procd init script

obviously I commented it after realizing that no event was recorded / emitted ...

in 24 hours I hope to be able to attach a report in the event that an unexpected disconnection occurs ...

I reactivated the events and disabled both the service created by me and any crontab regarding the connectivity check

currently I have this file:

cat /etc/hotplug.d/iface/99-ifup-wan

logger -t hotplug "/etc/hotplug.d/iface Device: ${DEVICE} / Action: ${ACTION} / Interface: ${INTERFACE}"

[ "$DEVICE" = "wwan0" -a  "$ACTION" = "ifup" -a "$INTERFACE" = "wan_4" ] && {
logger -t hotplug "iface wan_4 up detected... from /etc/hotplug.d/iface/ exec: /root/wan2_connect (For now it does nothing...)"
#sh -x /root/wan2_connect
}

[ "$DEVICE" = "wwan0" -a  "$ACTION" = "ifupdate" -a "$INTERFACE" = "wan" ] && {
logger -t hotplug "iface wan up detected... from /etc/hotplug.d/iface/ exec: /root/wan2_connect (For now it does nothing...)"
#sh -x /root/wan2_connect
}

and I proceeded to clean the logs.

cat clearlog

#!/bin/sh
dmesg -c
/etc/init.d/log restart
sleep 1
logger "exec: /root/clearlog $(date)"
root@LTE5398-M904:~# logread
Mon Apr 28 00:53:24 2025 user.notice root: exec: /root/clearlog Mon Apr 28 00:53:24 CEST 2025

cat /etc/crontabs/root

#min hour day month day-week command
#0-59 0-23 1-31 1-12 0-6(0=Sunday) exec

service

Usage: service <service> [command]
/etc/init.d/atd                    enabled         running
/etc/init.d/boot                   enabled         stopped
/etc/init.d/bootcount              enabled         stopped
/etc/init.d/cron                   enabled         running
/etc/init.d/dnsmasq                enabled         running
/etc/init.d/done                   enabled         stopped
/etc/init.d/dropbear               enabled         running
/etc/init.d/firewall               enabled         stopped
/etc/init.d/fstab                  enabled         stopped
/etc/init.d/gpio_switch            enabled         stopped
/etc/init.d/https-dns-proxy        enabled         running
/etc/init.d/ksmbd                 disabled         stopped
/etc/init.d/led                    enabled         stopped
/etc/init.d/log                    enabled         running
/etc/init.d/network                enabled         running
/etc/init.d/odhcpd                 enabled         running
/etc/init.d/packet_steering        enabled         stopped
/etc/init.d/pingcheck             disabled         stopped
/etc/init.d/rpcd                   enabled         running
/etc/init.d/sysctl                 enabled         stopped
/etc/init.d/sysfixtime             enabled         stopped
/etc/init.d/sysntpd                enabled         running
/etc/init.d/system                 enabled         stopped
/etc/init.d/ubihealthd             enabled         running
/etc/init.d/ucitrack               enabled         stopped
/etc/init.d/uhttpd                 enabled         running
/etc/init.d/umount                 enabled         stopped
/etc/init.d/urandom_seed           enabled         stopped
/etc/init.d/urngd                  enabled         running
/etc/init.d/watchdog_mbim         disabled         stopped
/etc/init.d/wpad                   enabled         running

version of OpenWrt running:

ubus call system board

{
        "kernel": "6.6.73",
        "hostname": "LTE5398-M904",
        "system": "MediaTek MT7621 ver:1 eco:3",
        "model": "Zyxel LTE5398-M904",
        "board_name": "zyxel,lte5398-m904",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "24.10.0",
                "revision": "r28427-6df0e3d02a",
                "target": "ramips/mt7621",
                "description": "OpenWrt 24.10.0 r28427-6df0e3d02a",
                "builddate": "1738624177"
        }
}