You are not logged in.
Hello all,
I have been looking at nohup and disown buy nothing work.
I have a bash script that mount a usb key and rsync a folder. But I want to be able to launch it over shh and let it run I'm the background and close the remote connection.
Thank you for reading and your assistance.
Offline
You can't use systemd-mount and a timer?
# edit: this sounds like an X-Y problem: what are you actually trying to achieve?
Last edited by jasonwryan (2022-09-01 21:54:45)
Offline
Or if not a timer, just a regular service that you could "start" over ssh and then it runs supervised by systemd.
Alternatively, use tmux / screen and dettach the session.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Offline
Also just looking at nohup and disown won't help - you gotta use them
Assuming a service or timer won't cut it you need to elaborate on the actual problem - depending on the nature of the script/process you're trying to detach, it might not like that its stdin gets closed.
Offline
Thank you, I haven't though of creating a systemd service.
Will get on to it!
Offline