mirror of
https://github.com/tmux-plugins/tmux-continuum.git
synced 2024-11-21 18:58:46 +00:00
Merge pull request #100 from primeapple/master
Accept different tmux installation path in systemd unit file
This commit is contained in:
commit
f5e554a31d
@ -11,6 +11,7 @@ template() {
|
|||||||
local options="$@"
|
local options="$@"
|
||||||
local content=""
|
local content=""
|
||||||
local resurrect_save_script_path="$(get_tmux_option "$resurrect_save_path_option" "$(realpath ${CURRENT_DIR}/../../../tmux-resurrect/scripts/save.sh)")"
|
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
|
read -r -d '' content <<-EOF
|
||||||
[Unit]
|
[Unit]
|
||||||
@ -20,10 +21,10 @@ template() {
|
|||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
Type=forking
|
||||||
Environment=DISPLAY=:0
|
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=${resurrect_save_script_path}
|
||||||
ExecStop=/usr/bin/tmux kill-server
|
ExecStop=${tmux_path} kill-server
|
||||||
KillMode=none
|
KillMode=none
|
||||||
|
|
||||||
RestartSec=2
|
RestartSec=2
|
||||||
|
Loading…
Reference in New Issue
Block a user