we already wrote about nohup command, which allows you to ignore HUP (hangup) signal and keep running the command after user logged out. You can accomplish the same behavior using screen or disown command.
setsid is another program that runs a program in a new session. For example run a script called ~/scripts/mirror.site:
ssh you@remote-box.com
setsid ~/scripts/mirror.site
logout
You can also pass argument to command or script:
ssh you@remote-box.com
setsid ~/scripts/mirror.site
logout
You can also pass argument to command or script:
setsid /usr/bin/beep-media-player '/nas/mp3/xyz.mp3'
Please note that setsid included in miscellaneous system utilities package called util-linux under Debian / Ubuntu Linux.
No comments:
Post a Comment
Do not post irrelevant comments, please!