Post
Topic
Board Announcements (Altcoins)
Re: BiblePay | 10% Charity | POBH CPU | Sanctuaries (Masternodes) | Orphans
by
jsheets1970
on 04/12/2019, 04:01:50 UTC
Hope this helps, for the Iquidus explorer, I have a crontab that tries to run the biblepay daemon every 5 minutes:

crontab -e

Code:
*/5 * * * * /home/biblepay-evolution/src/biblepayd > /dev/null 2>&1

Gave this to Rogue a little earlier tonight. You could use this also

#!/bin/bash
# checkprocess.sh

PROCESS=

check_running_process()
{
sudo ps -ef | grep -v grep | grep $PROCESS > /dev/null
result=$?
#echo "exit code: ${result}"

if [ "${result}" -eq "0" ] ; then
    echo "Process is Running"
    return 1
else
    echo "Process is Stopped"
    return 0
fi

}

echo Current Date and Time is: date +"%Y-%m-%d %T"
if (check_running_process); then
#Want to make sure it is not already being started
   sleep 10
   if (check_running_process); then
      echo "Restarting Process now"
      #syntax to restart the process
      #insert your command to restart the process that is not running <-- Here is the command you would put in to start the process if it has died
   fi
fi