mirror of
https://github.com/naruxde/revpipyload.git
synced 2025-11-08 15:13:52 +01:00
MQTT Defaultwerte angepasst
init-file fest mit -d Argument versehen und Codepage für Python
This commit is contained in:
@@ -25,8 +25,8 @@ bindip = *
|
|||||||
|
|
||||||
[MQTT]
|
[MQTT]
|
||||||
mqtt = 0
|
mqtt = 0
|
||||||
basetopic = revpi01
|
basetopic = revpi0000
|
||||||
sendinterval = 30
|
sendinterval = 15
|
||||||
send_on_event = 0
|
send_on_event = 0
|
||||||
write_outputs = 0
|
write_outputs = 0
|
||||||
broker_address = localhost
|
broker_address = localhost
|
||||||
|
|||||||
7
debian/revpipyload.default
vendored
7
debian/revpipyload.default
vendored
@@ -7,8 +7,5 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Additional options that are passed to the Daemon.
|
# Additional options that are passed to the Daemon.
|
||||||
# For verbose logging add a -v or -vv
|
# For verbose logging add -v or -vv
|
||||||
DAEMON_ARGS="-d"
|
DAEMON_ARGS=""
|
||||||
|
|
||||||
# Codepage for Python (do not change)
|
|
||||||
export LANG=C.UTF-8
|
|
||||||
|
|||||||
22
debian/revpipyload.init
vendored
22
debian/revpipyload.init
vendored
@@ -5,18 +5,18 @@
|
|||||||
# Required-Stop: $remote_fs $syslog $piControl
|
# Required-Stop: $remote_fs $syslog $piControl
|
||||||
# Default-Start: 2 3 4 5
|
# Default-Start: 2 3 4 5
|
||||||
# Default-Stop: 0 1 6
|
# Default-Stop: 0 1 6
|
||||||
# Short-Description: RevPiPyLoad to execute python plc program
|
# Short-Description: PLC services for RevolutionPi
|
||||||
# Description: This file manages the RevPiPyLoad on system
|
# Description: This file manages the RevPiPyLoad on system
|
||||||
# boot. The Loader starts your python plc program and
|
# boot. The Loader starts and monitors your python plc
|
||||||
# check whether it is running.
|
# program and other PLC services.
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
# Author: Akira Naru Takizawa <akira@narux.de>
|
# Author: Akira Naru Takizawa <akira@narux.de>
|
||||||
|
|
||||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||||
DESC="RevPiPyLoad to run plc program"
|
DESC="PLC services for RevolutionPi"
|
||||||
NAME=revpipyload
|
NAME=revpipyload
|
||||||
DAEMON_ARGS="-d"
|
DAEMON_ARGS=""
|
||||||
PIDFILE=/var/run/$NAME.pid
|
PIDFILE=/var/run/$NAME.pid
|
||||||
SCRIPTNAME=/etc/init.d/$NAME
|
SCRIPTNAME=/etc/init.d/$NAME
|
||||||
DAEMON=/usr/share/revpipyload/revpipyload.py
|
DAEMON=/usr/share/revpipyload/revpipyload.py
|
||||||
@@ -35,6 +35,9 @@ DAEMON=/usr/share/revpipyload/revpipyload.py
|
|||||||
# and status_of_proc is working.
|
# and status_of_proc is working.
|
||||||
. /lib/lsb/init-functions
|
. /lib/lsb/init-functions
|
||||||
|
|
||||||
|
# Codepage for Python (do not change)
|
||||||
|
export LANG=C.UTF-8
|
||||||
|
|
||||||
#
|
#
|
||||||
# Function that starts the daemon/service
|
# Function that starts the daemon/service
|
||||||
#
|
#
|
||||||
@@ -44,11 +47,8 @@ do_start()
|
|||||||
# 0 if daemon has been started
|
# 0 if daemon has been started
|
||||||
# 1 if daemon was already running
|
# 1 if daemon was already running
|
||||||
# 2 if daemon could not be started
|
# 2 if daemon could not be started
|
||||||
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
|
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null || return 1
|
||||||
|| return 1
|
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- -d $DAEMON_ARGS || return 2
|
||||||
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
|
|
||||||
$DAEMON_ARGS \
|
|
||||||
|| return 2
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -98,7 +98,7 @@ case "$1" in
|
|||||||
status)
|
status)
|
||||||
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
|
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
|
||||||
;;
|
;;
|
||||||
reload)
|
reload|force-reload)
|
||||||
log_daemon_msg "Reloading $DESC" "$NAME"
|
log_daemon_msg "Reloading $DESC" "$NAME"
|
||||||
do_reload
|
do_reload
|
||||||
log_end_msg $?
|
log_end_msg $?
|
||||||
|
|||||||
Reference in New Issue
Block a user