File tree 4 files changed +67
-1
lines changed
4 files changed +67
-1
lines changed Original file line number Diff line number Diff line change
1
+
2
+ all :
3
+ go build
4
+
5
+ release : all git-tag
6
+ tar jcf modbus-demo-` cat VERSION` .tar.bz2 modbustcp modbustcpd LICENSE README.md
7
+
8
+ git-tag : bump
9
+ git tag ` cat VERSION`
10
+ git push --tags
11
+
12
+ bump :
13
+ echo ` cat VERSION` +.1 | bc > VERSION.new
14
+ rm VERSION
15
+ mv VERSION.new VERSION
16
+
17
+ upload :
18
+ scp modbus-demo-` cat VERSION` .tar.bz2 oplerno:/var/lib/lxd/containers/ateps-updates/rootfs/var/www/portage/distfiles/
Original file line number Diff line number Diff line change
1
+ 1.5
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ func main() {
37
37
serv .RegisterFunctionHandler (4 , ReadRegisters )
38
38
serv .RegisterFunctionHandler (6 , WriteRegisters )
39
39
40
- err := serv .ListenTCP ("127.0.0.1 :502" )
40
+ err := serv .ListenTCP (":502" )
41
41
if err != nil {
42
42
log .Printf ("%v\n " , err )
43
43
}
Original file line number Diff line number Diff line change
1
+ #! /sbin/openrc-run
2
+ # Copyright 1999-2015 Gentoo Foundation, Daniel Crompton
3
+ # Distributed under the terms of the GNU General Public License v2
4
+
5
+ extra_commands=" checkconfig"
6
+ extra_started_commands=" reload"
7
+
8
+ : ${MODBUSD_PIDFILE:=/ var/ run/ ${SVCNAME} .pid}
9
+ : ${MODBUSD_BINARY:=/ usr/ sbin/ modbustcp}
10
+
11
+ depend () {
12
+ use logger dns
13
+ }
14
+
15
+ checkconfig () {
16
+ return 0
17
+ }
18
+
19
+ start () {
20
+ checkconfig || return 1
21
+
22
+ ebegin " Starting ${SVCNAME} "
23
+ start-stop-daemon -b --start --exec " ${MODBUSD_BINARY} " \
24
+ --pidfile " ${MODBUSD_PIDFILE} " \
25
+ -- ${MODBUSD_OPTS}
26
+ eend $?
27
+ }
28
+
29
+ stop () {
30
+ if [ " ${RC_CMD} " = " restart" ] ; then
31
+ checkconfig || return 1
32
+ fi
33
+
34
+ ebegin " Stopping ${SVCNAME} "
35
+ start-stop-daemon --stop --exec " ${MODBUSD_BINARY} " \
36
+ --pidfile " ${MODBUSD_PIDFILE} " --quiet
37
+ eend $?
38
+ }
39
+
40
+ reload () {
41
+ checkconfig || return 1
42
+ ebegin " Reloading ${SVCNAME} "
43
+ start-stop-daemon --signal HUP \
44
+ --exec " ${MODBUSD_BINARY} " --pidfile " ${MODBUSD_PIDFILE} "
45
+ eend $?
46
+ }
47
+
You can’t perform that action at this time.
0 commit comments