Okay I managed to make it work with a new code:
#!/bin/bash
#!/bin/bash
if ! pgrep -fu USER pivxd >/dev/null; then
~/pivx-3.1.0/bin/pivxd -daemon 2>&1 >/dev/null
fi
This is for pivx but for dash it is the same I guess!
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...