How to run bash script so it has speciffic name in the process list?
Hello,
i need to keep running one bash script. And if it gets killed or stoped by any reason, i need to start it again as soon as possible.
I could create cron task to run it and in the script create condition based on ps aux results to see if it already running. If running i will exit the script and do not continue.
But in process list i cant find the script, only sometimes commands it is using.
// update: when run "./scriptname" i cant find, but when run "sh ./scriptname" i can see "sh scriptname" in the process list
Last edited by postcd; 07-30-2016 at 03:57 AM.
|