Post
Topic
Board Announcements (Altcoins)
Re: [ANN][21][21coin][SHA-256]ULTRA RARE 21 COINS - Mine your 21Century Coin Now
by
PhatJ
on 25/01/2014, 15:18:14 UTC
This is absolutely ~~NOT~~ a fix, but it has been working to keep 21d running, on UNIX   (Sorry windows folks)


Code:
#!/bin/sh
run_21() {

 while :; do
 
    cd /tmp
    /home/coin/21coin/src/21d 
    EXITSTATUS=$?
    if test "x$EXITSTATUS" = "x0" ; then
# Properly shutdown....
        echo "21d properly shutdown"
exit
    elif test "0$EXITSTATUS" -gt "128" ; then
EXITSIGNAL=$(($EXITSTATUS - 128))
echo "21D exited on signal $EXITSIGNAL."
    else
        message "21d died with code $EXITSTATUS."
    fi
    echo "Automatically restarting 21d."
    sleep .1
 done
}

trap '' PIPE
run_21 &


Create a file (safe_21d) in the src directory of the coin and run ./safe_21d
(chmod u+x ./safe_21d) 



Tips appreciated  21C:  2JJhJqLs2JJm1ehhwLoeqNUkvqtZKdfHSf