File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,29 @@ Finally run a the example client but now address the proxy instead of the server
116116$ python examples/simple_tcp_client.py -a 0:9000
117117holding registers: [1, 2, 3, 4]
118118` ` `
119+ # # Running as a Service
120+ 1. move the config file to a location you can remember, for example : to `/usr/lib/mproxy-conf.yaml`
121+ 2. go to `/etc/systemd/system/`
122+ 3. use nano or any other text editor of your choice to create a service file `mproxy.service`
123+ 4. the file should contain the following information :
124+ ` ` `
125+ [Unit]
126+ Description=Modbus-Proxy
127+ After=network.target
128+
129+ [Service]
130+ Type=simple
131+ Restart=always
132+ ExecStart = modbus-proxy -c ./usr/lib/mproxy-conf.yaml
133+
134+ [Install]
135+ WantedBy=multi-user.target
136+ ` ` `
137+ 5. `run systemctl daemon-reload`
138+ 6. `systemctl enable mproxy.service`
139+ 7. `systemctl start mproxy.service`
140+
141+ The file names given here are examples, you can choose other names, if you wish.
119142
120143# # Docker
121144
You can’t perform that action at this time.
0 commit comments