diff options
| author | Jon duSaint | 2026-02-23 21:50:04 -0800 |
|---|---|---|
| committer | Jon duSaint | 2026-02-23 21:50:04 -0800 |
| commit | ddd36cb3ae690a0b37e2653bac2acaf8b53af336 (patch) | |
| tree | e0997a8c1c86ede26231c34c063df21fc0dc4c4e /mqtt-esp5100-init.d | |
| parent | deff9f834414a25b01159420587c8731efe1b203 (diff) | |
mqtt-esp5100: service files
Diffstat (limited to 'mqtt-esp5100-init.d')
| -rwxr-xr-x | mqtt-esp5100-init.d | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/mqtt-esp5100-init.d b/mqtt-esp5100-init.d new file mode 100755 index 0000000..ea3804a --- /dev/null +++ b/mqtt-esp5100-init.d @@ -0,0 +1,19 @@ +#!/sbin/openrc-run + +name="MQTT for ESP-5100" +command="/usr/local/bin/${RC_SVCNAME}" +description="MQTT for ESP-5100" +pidfile="/var/run/${RC_SVCNAME}.pid" +command_args="$ARGS" + +depend() { + use logger dns + need net +} + +start_pre() { + if ! ip link show can0 | grep -q UP; then + ip link set can0 up type can bitrate 250000 + ifconfig can0 up + fi +} |
