Commit ec0992b9 authored by Guillaume Tucker's avatar Guillaume Tucker

Tell systemd to automatically stop services when the board is unplugged

Use the StopWhenUnneeded=yes property to automatically kill the
service processes when the board is unplugged (and the USB device goes
goes away as reported by udev).

Thanks to: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Guillaume Tucker's avatarGuillaume Tucker <guillaume.tucker@collabora.com>
parent fee27810
[Unit]
Description="Google Servo control board manager"
ConditionPathExists=/etc/google-servo.conf
StopWhenUnneeded=yes
[Service]
Type=notify
NotifyAccess=all
ExecStart=/usr/bin/run-servod /dev/%I
Restart=on-failure
KillMode=control-group
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment