Skip to content

Commit

Permalink
Merge pull request #100 from primeapple/master
Browse files Browse the repository at this point in the history
Accept different tmux installation path in systemd unit file
  • Loading branch information
bruno- authored Dec 1, 2021
2 parents 44e6be6 + 669c3cf commit f5e554a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/handle_tmux_automatic_start/systemd_enable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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
Expand Down

0 comments on commit f5e554a

Please sign in to comment.