Add systemd unit file for ARDOPc

Convenient for users that want to easily start/stop ARDOPc, or have it
start automatically on boot.
This commit is contained in:
Martin Hebnes Pedersen 2018-01-07 15:29:38 +01:00
parent 790d72cac9
commit 5198138574
2 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,11 @@
[Unit]
Description=ardopc - ARDOP softmodem for %i
After=network.target sound.target
[Service]
User=%i
ExecStart=/bin/sh -c "cd /tmp && /usr/local/bin/ardopc"
Restart=on-failure
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
[ -e "/etc/systemd/system/ardop@.service" ] && rm /etc/systemd/system/ardop@.service
cp "$DIR/ardop@.service" "/lib/systemd/system/ardop@.service"
systemctl daemon-reload
echo "Installed. Install (pi)ardopc as /usr/local/bin/ardopc and start it with 'systemctl start ardop@username'"