Link to home
Start Free TrialLog in
Avatar of Rohit Bajaj
Rohit BajajFlag for India

asked on

what does daemon command do in linux

HI,
I came across the following command :
exec="mvn jetty:run -DFLOCK_APPS_CONFIG=${FLOCK_APPS_CONFIG} -DPORT=${PORT}"
daemon --user=$user $exec &

Open in new window

what does it do ?
why to run a command using daemon ?

Thanks
SOLUTION
Avatar of Kent W
Kent W
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Rohit Bajaj

ASKER

Hi,
But when i run this script i dont see anything running
jetty doesnt run which ideally it should as the exec runs the jetty server
from inside the directory /opt/flock-snippets
I had put cd /opt/flock-snippets above the commands

doing ps -Af | grep jetty does not show anything running.
but if i dont use daemon it works