From b8a6eded2bf805b4054825e887aa06108d33b911 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 17 Jan 2025 16:29:25 -0800 Subject: [PATCH] systemd: configure comma service to allow start/stop (#427) * correct service config * restart not compatible with oneshot, but never worked anyway --- userspace/files/comma.service | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/userspace/files/comma.service b/userspace/files/comma.service index c8d712e..e2e3cce 100644 --- a/userspace/files/comma.service +++ b/userspace/files/comma.service @@ -2,10 +2,12 @@ After=local-fs.target [Service] -Type=simple +Type=oneshot +RemainAfterExit=true User=comma -Restart=always -ExecStart=/bin/bash -c "/usr/bin/tmux new-session -s comma -d /usr/comma/comma.sh && sleep infinity" +ExecStart=/bin/bash -c "/usr/bin/tmux new-session -s comma -d /usr/comma/comma.sh" +# TODO: send SIGTERM first, then kill after a timeout +ExecStop=/bin/bash -c "/usr/bin/tmux kill-session -t comma" TimeoutStopSec=1 LimitRTPRIO=100 LimitNICE=-10