Skip to content

Commit f5e554a

Browse files
authored
Merge pull request #100 from primeapple/master
Accept different tmux installation path in systemd unit file
2 parents 44e6be6 + 669c3cf commit f5e554a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/handle_tmux_automatic_start/systemd_enable.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ template() {
1111
local options="$@"
1212
local content=""
1313
local resurrect_save_script_path="$(get_tmux_option "$resurrect_save_path_option" "$(realpath ${CURRENT_DIR}/../../../tmux-resurrect/scripts/save.sh)")"
14+
local tmux_path="$(which tmux)"
1415

1516
read -r -d '' content <<-EOF
1617
[Unit]
@@ -20,10 +21,10 @@ template() {
2021
[Service]
2122
Type=forking
2223
Environment=DISPLAY=:0
23-
ExecStart=/usr/bin/tmux ${systemd_tmux_server_start_cmd}
24+
ExecStart=${tmux_path} ${systemd_tmux_server_start_cmd}
2425
2526
ExecStop=${resurrect_save_script_path}
26-
ExecStop=/usr/bin/tmux kill-server
27+
ExecStop=${tmux_path} kill-server
2728
KillMode=none
2829
2930
RestartSec=2

0 commit comments

Comments
 (0)