Skip to content

Commit 59f426a

Browse files
committed
add startup-script-skelletons
1 parent 661ab4c commit 59f426a

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

startup/openwrt/mqtt-executor

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/sh /etc/rc.common
2+
# Example script
3+
# Copyright (C) 2007 OpenWrt.org
4+
5+
START=99
6+
STOP=15
7+
8+
start() {
9+
/path/to/mqtt-executor -broker tcp://<mqtt-broker>:1883 -config /path/to/config.json
10+
}
11+
12+
stop() {
13+
killall mqtt-executor
14+
}

startup/systemd/mqtt-executor.service

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[Unit]
2+
Description=MQTTExecutor
3+
After=network.target
4+
5+
[Service]
6+
User=<user>
7+
Type=simple
8+
ExecStart=/path/to/mqtt-executor -broker tcp://<mqtt-broker>:1883 -config /path/to/config.json
9+
StartLimitBurst=60
10+
StartLimitIntervalSec=3
11+
Restart=on-failure
12+
13+
[Install]
14+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)