From cb4156ec5f16c5fcb07f30efe9b45a8b27fc0318 Mon Sep 17 00:00:00 2001 From: Fr3deric Date: Mon, 28 Dec 2020 19:37:25 +0000 Subject: [PATCH] add systemd service for linphone-daemon --- README.md | 24 ++++++++++++++++++++++++ linphone-daemon.service | 15 +++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 linphone-daemon.service diff --git a/README.md b/README.md index a459a40..801f7e9 100644 --- a/README.md +++ b/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 <>/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 + ``` diff --git a/linphone-daemon.service b/linphone-daemon.service new file mode 100644 index 0000000..8cc13e4 --- /dev/null +++ b/linphone-daemon.service @@ -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