-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated to listen on 0.0.0.0
- Loading branch information
Showing
4 changed files
with
67 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
all: | ||
go build | ||
|
||
release: all git-tag | ||
tar jcf modbus-demo-`cat VERSION`.tar.bz2 modbustcp modbustcpd LICENSE README.md | ||
|
||
git-tag: bump | ||
git tag `cat VERSION` | ||
git push --tags | ||
|
||
bump: | ||
echo `cat VERSION`+.1 |bc > VERSION.new | ||
rm VERSION | ||
mv VERSION.new VERSION | ||
|
||
upload: | ||
scp modbus-demo-`cat VERSION`.tar.bz2 oplerno:/var/lib/lxd/containers/ateps-updates/rootfs/var/www/portage/distfiles/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/sbin/openrc-run | ||
# Copyright 1999-2015 Gentoo Foundation, Daniel Crompton | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
extra_commands="checkconfig" | ||
extra_started_commands="reload" | ||
|
||
: ${MODBUSD_PIDFILE:=/var/run/${SVCNAME}.pid} | ||
: ${MODBUSD_BINARY:=/usr/sbin/modbustcp} | ||
|
||
depend() { | ||
use logger dns | ||
} | ||
|
||
checkconfig() { | ||
return 0 | ||
} | ||
|
||
start() { | ||
checkconfig || return 1 | ||
|
||
ebegin "Starting ${SVCNAME}" | ||
start-stop-daemon -b --start --exec "${MODBUSD_BINARY}" \ | ||
--pidfile "${MODBUSD_PIDFILE}" \ | ||
-- ${MODBUSD_OPTS} | ||
eend $? | ||
} | ||
|
||
stop() { | ||
if [ "${RC_CMD}" = "restart" ] ; then | ||
checkconfig || return 1 | ||
fi | ||
|
||
ebegin "Stopping ${SVCNAME}" | ||
start-stop-daemon --stop --exec "${MODBUSD_BINARY}" \ | ||
--pidfile "${MODBUSD_PIDFILE}" --quiet | ||
eend $? | ||
} | ||
|
||
reload() { | ||
checkconfig || return 1 | ||
ebegin "Reloading ${SVCNAME}" | ||
start-stop-daemon --signal HUP \ | ||
--exec "${MODBUSD_BINARY}" --pidfile "${MODBUSD_PIDFILE}" | ||
eend $? | ||
} | ||
|