From 669c3cfcc30f9c58ea8ba5fd10c5623bbc5ffcf1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Toni=20M=C3=BCller?= Date: Wed, 1 Dec 2021 15:16:27 +0100 Subject: [PATCH] different tmux installation paths for systemd --- 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 a724c94..5f23d0a 100755 --- a/scripts/handle_tmux_automatic_start/systemd_enable.sh +++ b/scripts/handle_tmux_automatic_start/systemd_enable.sh @@ -11,6 +11,7 @@ template() { local options="$@" local content="" local resurrect_save_script_path="$(get_tmux_option "$resurrect_save_path_option" "$(realpath ${CURRENT_DIR}/../../../tmux-resurrect/scripts/save.sh)")" + local tmux_path="$(which tmux)" read -r -d '' content <<-EOF [Unit] @@ -20,10 +21,10 @@ template() { [Service] Type=forking Environment=DISPLAY=:0 - ExecStart=/usr/bin/tmux ${systemd_tmux_server_start_cmd} + ExecStart=${tmux_path} ${systemd_tmux_server_start_cmd} ExecStop=${resurrect_save_script_path} - ExecStop=/usr/bin/tmux kill-server + ExecStop=${tmux_path} kill-server KillMode=none RestartSec=2