From 5f68e69754160a8a0f0d04e64ece8bb72b9601a4 Mon Sep 17 00:00:00 2001 From: varnav Date: Wed, 17 Jan 2024 11:49:45 -0500 Subject: [PATCH] Added systemd service file --- tools/dumpsbs.service | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tools/dumpsbs.service diff --git a/tools/dumpsbs.service b/tools/dumpsbs.service new file mode 100644 index 0000000..e019458 --- /dev/null +++ b/tools/dumpsbs.service @@ -0,0 +1,24 @@ +[Unit] +Description=dumpsbs service +ConditionPathExists=/opt/dumpsbs +After=network-online.target readsb.service +Wants=network-online.target + +[Service] +Type=simple +User=dumpsbs +Group=nogroup +LimitNOFILE=1024 + +#Restart=on-failure +Restart=always + +WorkingDirectory=/opt/dumpsbs +ExecStart=/opt/dumpsbs/dumpsbs -host 127.0.0.1:30003 -output /opt/dumpsbs/logs +# make sure log directory exists and perms set +ExecStartPre=+/bin/mkdir -p /opt/dumpsbs/logs +ExecStartPre=+/bin/chown dumpsbs /opt/dumpsbs/logs +ExecStartPre=+/bin/chmod 755 /opt/dumpsbs/logs + +[Install] +WantedBy=multi-user.target