简体   繁体   中英

ESXi SSH session exit kills running job - nohup same result

I have a script on ESXi that I need to be able to ssh into, execute the script, disown the process and exit ssh session, while keeping the process running? I have tried executing it the following ways:

nohup /etc/run_command

nohup /etc/run_comand &

I have also run across trying this example: ( Website - Sudoall.com )

exec </dev/null >/dev/null 2>/dev/null

but I must not be using it right, because I get the same results.

Is there a way to disown the process, exit the ssh session without killing the running process on ESXi?

---- Update ----

After a lot of google research, I stumbled across this Website . ESXi does not have screen, tmux, or disown. An nohup was not working...I gave setsid a shot, and it worked.

setsid /etc/run_command &

After a lot of google research, I stumbled across this Website . ESXi does not have screen, tmux, or disown. An nohup was not working...I gave setsid a shot, and it worked.

setsid /etc/run_command &

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM