Hello, dear developers.
After upgrading HestiaCP to version 1.9.2, I started using jailbash. The problem is that after the session ends, all child processes are closed. We need functionality similar to screen to run, for example, a telegram bot in Python using the command “screen -d -m python3 bot.py” or “python 3 bot.py &”. after using jailbash, I don’t want to use bash anymore. Do you have any ideas about this?
I removed the “–die-with-parent” startup key in the jailbash startup script file “/usr/sbin/jailbash”, while the child processes do not close, but I cannot return to this jailbash session.
Can you just run screen or tmux?
if you use the “–die-with-parent” key to start jailbash, all processes running in the terminal, including screen, will be closed after the terminal is closed. If you remove this key, the “screen” will remain open after exiting the terminal, but after exiting, you cannot open the previously working “screen”.
I see. I have not experimented with the new jailbash feature yet. Thank you for sharing those details. I wish I had a useful suggestion to offer.
This is by design. If you’re jailing an user you don’t want to allow the user to be able to leave background processes behind.
Since a new clean jail is started everytime the user is logged in, screen processes won’t be transferred between jails. You’ll have to write your own jail script to support that.
Can you use a cronjob?
Easiest method is to use
Afaik systemd still works on user level. So your user can add a systemd file and ask systemd to keep that process running.