Hello Everyone!
I wanted to try this here but I fear that it does not work. What Dash4Ever found is actually an error. Running the script
ps aux | grep $myusername | grep dashd | grep -v wc -l
will give an error of grep.
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.
So the thing why nobody noticed is that the script simply starts dashd again. But since it is already running the process gets canceled. Therefore it really restarts dashd when it crashed. However, this is not a really nice solution (it is basically trying to restart dashd every 10 minutes). Furthermore, I want to add a command into the script that, in case of a crash, I want to receive a mail via ssmtp. This does not seem to work (probably because of the problem of grep).
EDIT: Okay I had the $ in front of my username. However, the IF command is even true if the dashd is already running.
Can we fix this issue ? I did not come up with a good solution.
Thanks guys!
I wanted to try this here but I fear that it does not work. What Dash4Ever found is actually an error. Running the script
ps aux | grep $myusername | grep dashd | grep -v wc -l
will give an error of grep.
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.
So the thing why nobody noticed is that the script simply starts dashd again. But since it is already running the process gets canceled. Therefore it really restarts dashd when it crashed. However, this is not a really nice solution (it is basically trying to restart dashd every 10 minutes). Furthermore, I want to add a command into the script that, in case of a crash, I want to receive a mail via ssmtp. This does not seem to work (probably because of the problem of grep).
EDIT: Okay I had the $ in front of my username. However, the IF command is even true if the dashd is already running.
Can we fix this issue ? I did not come up with a good solution.
Thanks guys!
Last edited: