I want to run a command silently via ssh and exit the shell, but the program should continue running. I tried screen and nohup, but apparently with those it executes 3 processes instead of 1:
user:/bin/bash ./[script]
root: sudo [commandInTheScript]
root: [commandInTheScript]
What am I doing wrong?
P.S.: The thing is that I want to run this command with the Workflow app (iOS), but the app waits until the command is finished, so it freezes 'forever'
How did you use nohup?
Eg.
nohup ruby server.rb &
Ampersand (&) is necessary to let command run in the background.
To run your process back ground, at end of the command you have to use
&
. In your case, you have to run without session since you are planning to exit fromssh
after execute the command, so you neednohup
nohup < command > &
This makes your command runs on background and shows its PID