From f29adfcc0a713d2240e28b848d3c7ad9b0a12fd8 Mon Sep 17 00:00:00 2001 From: Damian Wrobel Date: Tue, 3 Sep 2024 23:24:18 +0200 Subject: [PATCH] Add modbus-proxy.service file Signed-off-by: Damian Wrobel --- systemd/modbus-proxy.service | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 systemd/modbus-proxy.service diff --git a/systemd/modbus-proxy.service b/systemd/modbus-proxy.service new file mode 100644 index 0000000..bdca22e --- /dev/null +++ b/systemd/modbus-proxy.service @@ -0,0 +1,29 @@ +# This file is part of modbus-proxy. +# +# Copyright 2022 Damian Wrobel +# +# modbus-proxy is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# modbus-proxy is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with modbus-proxy. If not, see . + +[Unit] +Description=ModBus TCP proxy +Documentation=https://github.com/tiagocoutinho/modbus-proxy +After=network.target +ConditionPathExists=/etc/modbus-proxy.yaml + +[Service] +Restart=on-failure +ExecStart=modbus-proxy --config-file /etc/modbus-proxy.yaml + +[Install] +WantedBy=multi-user.target