Closed ioogithub closed 2 years ago
Yes, this is possible, you just have to figure out the correct value for set -g @resurrect-processes
. Try maybe set -g @resurrect-processes '~script.sh'
.
The instructions are here: https://github.com/tmux-plugins/tmux-resurrect/blob/master/docs/restoring_programs.md If something in the docs is not clear, consider opening a PR when you figure it out.
I have a script running in a bash shell. I would like to add the script name to the list of ressurrect-process list so that when I run the script, save the session then auto restore, the script will start again and continue running, just like the binary apps like tail for example.
Here is what I am trying to do:
prefix + b d
to detach from the session 5tmux kill-server
In my ~/.tmux/Session/tmux_resurrect_dt.txt file I see:
pane host 1 1 :* 3 :/home/user 0 bash :/bin/bash /home/user/script.sh
Restart
tmux
The session is restored however the script is not started. Instead I just get a command prompt. I have any other binary processes running they are restored but any scripts are not.
In the ~/.tmux file I tried many variations of the script name:
set -g @resurrect-processes 'script script.sh "~/script.sh /bin/bash /home/user/script.sh"
none of these options work. Is is possible for continuum to auto restore a session with running scripts or can only binary files be restored in this way?