Skip to content

Commit

Permalink
Add files for running srtla_rec as a systemd service
Browse files Browse the repository at this point in the history
  • Loading branch information
rationalsa committed Feb 5, 2021
1 parent 5ffbe4c commit 7eb76ef
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
12 changes: 12 additions & 0 deletions deploy_srtla_rec/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
cp ../srtla_rec /usr/local/bin/srtla_rec
chown root:root /usr/local/bin/srtla_rec
chmod 755 /usr/local/bin/srtla_rec

# don't replace if it already exists as it holds user settings
cp -n srtla_rec_default /etc/default/srtla_rec
chown root:root /etc/default/srtla_rec
chmod 644 /etc/default/srtla_rec

cp srtla_rec.service /etc/systemd/system/
chown root:root /etc/systemd/system/srtla_rec.service
chmod 644 /etc/systemd/system/srtla_rec.service
15 changes: 15 additions & 0 deletions deploy_srtla_rec/srtla_rec.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[Unit]
Description=srtla receive service
After=network.target

[Service]
EnvironmentFile=/etc/default/srtla_rec
ExecStart=/usr/local/bin/srtla_rec $SRTLA_LISTEN_PORT $SRT_ADDR
KillMode=process
Restart=on-failure
NoNewPrivileges=true
User=nobody
Group=nogroup

[Install]
WantedBy=multi-user.target
3 changes: 3 additions & 0 deletions deploy_srtla_rec/srtla_rec_default
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Options to pass to srtla_rec
SRTLA_LISTEN_PORT="10000"
SRT_ADDR="127.0.0.1 7000"

0 comments on commit 7eb76ef

Please sign in to comment.