I need to start a linux script in a background in deamon mode and then kill it when requried. To that end I try the following
script.sh -daemon -p zpid
What I'm confused about the above is,
-daemon flag, I assume this says to start the process as a daemon. Is this the same as using -d ?-p zpid part do ? I assume it assigns the processID to the zpid variable ?The -d represent the daemon and the -p is for naming the process id then you can use that name to find the process and stop it with this command ps aux | grep -i zipid
But I think its better to use screen or tmux as you can also see the output as well.