From fb52a173b898e60168fa878a91be797505609e3d Mon Sep 17 00:00:00 2001 From: Pete Peteches McCabe Date: Mon, 30 Nov 2015 08:09:48 +0000 Subject: [PATCH] Switched to forking to better represent server nature of tmux. - Also added RestartSec option to fix minor issues with restarts trying to start the server before it had fully shutdown. --- scripts/handle_tmux_automatic_start/systemd_enable.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/handle_tmux_automatic_start/systemd_enable.sh b/scripts/handle_tmux_automatic_start/systemd_enable.sh index 01b3af8..cef74c4 100755 --- a/scripts/handle_tmux_automatic_start/systemd_enable.sh +++ b/scripts/handle_tmux_automatic_start/systemd_enable.sh @@ -19,8 +19,7 @@ template() { Documentation=man:tmux(1) [Service] - Type=oneshot - RemainAfterExit=True + Type=forking Environment=DISPLAY=:0 ExecStart=/usr/bin/tmux ${systemd_tmux_server_start_cmd} @@ -28,6 +27,8 @@ template() { ExecStop=/usr/bin/tmux kill-server KillMode=none + RestartSec=2 + [Install] WantedBy=default.target EOF