Skip to content

Commit

Permalink
Added systemd service file
Browse files Browse the repository at this point in the history
  • Loading branch information
varnav authored Jan 17, 2024
1 parent 28ac0ba commit 5f68e69
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tools/dumpsbs.service
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 5f68e69

Please sign in to comment.