add systemd service for linphone-daemon
This commit is contained in:
parent
a57c1e42a0
commit
cb4156ec5f
24
README.md
24
README.md
|
@ -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
15
linphone-daemon.service
Normal 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
|
Loading…
Reference in a new issue