23 lines
474 B
Bash
23 lines
474 B
Bash
#!/bin/sh /etc/rc.common
|
|
# "new(er)" style init script
|
|
# Look at /lib/functions/service.sh on a running system for explanations of what other SERVICE_
|
|
# options you can use, and when you might want them.
|
|
|
|
START=80
|
|
APP=bell-mqtt-recv
|
|
SERVICE_WRITE_PID=1
|
|
SERVICE_DAEMONIZE=1
|
|
HOST=172.16.1.254
|
|
PORT=1883
|
|
TOPIC=home/bell/ring
|
|
GPIO=7
|
|
SECONDS=1
|
|
|
|
start() {
|
|
service_start /usr/sbin/$APP $HOST $PORT $TOPIC $GPIO $SECONDS
|
|
}
|
|
|
|
stop() {
|
|
service_stop /usr/sbin/$APP
|
|
}
|