add systemd service for linphone-daemon

This commit is contained in:
Fr3deric 2020-12-28 19:37:25 +00:00
parent a57c1e42a0
commit cb4156ec5f
2 changed files with 39 additions and 0 deletions

View File

@ -54,3 +54,27 @@
chroot debian-sid/ apt -y install linphone-cli
```
4. Create user inside the chroot environment
```
chroot /var/tmp/debian-sid adduser --disabled-password pi
```
5. Bind-mount `/dev` to make ALSA accessible within the chroot
```
cat <<EOF >>/etc/fstab
/dev /var/tmp/debian-sid/dev none bind 0 0
EOF
mount -a
```
6. Configure and enable `linphone-daemon` as `systemd` service
```
ln -sr linphone-daemon.service /etc/systemd/system
systemctl daemon-reload
systemctl enable linphone-daemon
systemctl start linphone-daemon
```

15
linphone-daemon.service Normal file
View File

@ -0,0 +1,15 @@
[Unit]
Description=Linphone Daemon
Requires=var-tmp-debian\x2dsid-dev.mount
After=var-tmp-debian\x2dsid-dev.mount
[Service]
Type=simple
RootDirectory=/var/tmp/debian-sid
ExecStartPre=/bin/rm -f /tmp/linphone
ExecStart=/usr/bin/linphone-daemon --pipe linphone --config /home/pi/linphone.conf
User=pi
Restart=on-failure
[Install]
WantedBy=multi-user.target