From: Michael Gernoth Date: Thu, 16 Jul 2015 21:19:01 +0000 (+0200) Subject: debian: make hmland configurable, update version X-Git-Tag: v0.102~25 X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/hmcfgusb/commitdiff_plain/53dbc699f936e7025e7f8d3dad18f62216e3c734?hp=1ee8653afbf410ed34f9dbc18ffe4beaf3c159e4 debian: make hmland configurable, update version --- diff --git a/debian/changelog b/debian/changelog index d855e9e..3075583 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +hmcfgusb (0.101-1) unstable; urgency=low + + * Update to new hmland version + * Don't enable logging by default + * Make hmland configurable by /etc/default/hmland + + -- Michael Gernoth Thu, 16 Jul 2015 22:55:51 +0200 + hmcfgusb (0.097-2) unstable; urgency=low * Add logrotate script diff --git a/debian/hmcfgusb.default.ex b/debian/hmcfgusb.default.ex deleted file mode 100644 index 5fcb36c..0000000 --- a/debian/hmcfgusb.default.ex +++ /dev/null @@ -1,10 +0,0 @@ -# Defaults for hmcfgusb initscript -# sourced by /etc/init.d/hmcfgusb -# installed at /etc/default/hmcfgusb by the maintainer scripts - -# -# This is a POSIX shell fragment -# - -# Additional options that are passed to the Daemon. -DAEMON_OPTS="" diff --git a/debian/hmcfgusb.links b/debian/hmcfgusb.links new file mode 100644 index 0000000..6451e03 --- /dev/null +++ b/debian/hmcfgusb.links @@ -0,0 +1,4 @@ +/opt/hm/hmcfgusb/flash-hmcfgusb /usr/bin/flash-hmcfgusb +/opt/hm/hmcfgusb/flash-ota /usr/bin/flash-ota +/opt/hm/hmcfgusb/hmsniff /usr/bin/hmsniff +/opt/hm/hmcfgusb/hmland /usr/sbin/hmland diff --git a/debian/hmland.default b/debian/hmland.default new file mode 100644 index 0000000..60ba9d2 --- /dev/null +++ b/debian/hmland.default @@ -0,0 +1,22 @@ +# Defaults for hmland initscript +# sourced by /etc/init.d/hmland +# installed at /etc/default/hmland by the maintainer scripts + +# +# This is a POSIX shell fragment +# + +# Is hmland enabled? +HMLAND_ENABLED="1" + +# Port hmland is listening on +HMLAND_PORT="1000" + +# Enable logging to /var/log/hmland.log +#HMLAND_LOGGING="yes" +HMLAND_LOGGING="no" + +# Additional options that are passed to hmland. +# e.g. to listen on localhost only: +#HMLAND_OPTS="-l 127.0.0.1" +HMLAND_OPTS="" diff --git a/debian/hmland.init b/debian/hmland.init index dd0dd0e..229157b 100644 --- a/debian/hmland.init +++ b/debian/hmland.init @@ -18,16 +18,28 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="Homematic LAN Adapter service" # Introduce a short description here NAME=hmland # Introduce the short server's name here DAEMON=/opt/hm/hmcfgusb/$NAME # Introduce the server's location here -DAEMON_ARGS="-r 03:30 -d -P -p 1000 -L /var/log/hmland.log" # Arguments to run the daemon with +DAEMON_ARGS="-d -P" # Arguments to run the daemon with PIDFILE=/var/run/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME # Exit if the package is not installed [ -x $DAEMON ] || exit 0 +HMLAND_LOGGING="no" +HMLAND_PORT="1000" +HMLAND_ENABLED="0" + # Read configuration variable file if it is present [ -r /etc/default/$NAME ] && . /etc/default/$NAME +test "$HMLAND_ENABLED" != "0" || exit 0 + +DAEMON_ARGS="$DAEMON_ARGS -p $HMLAND_PORT $HMLAND_OPTS" + +if [ "$HMLAND_LOGGING" = "yes" ]; then + DAEMON_ARGS="$DAEMON_ARGS -L /var/log/hmland.log" +fi + # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh