I had one hell of a time getting alias to work and failed. I had the alias in .bashrc and it worked great with old source stats.sh method.
however as a service on ubuntu 16.04 the systemctl would not find grc command at all. I had to make a work around for myself. I don't know if I'm doing something wrong or what but any input would be nice.
normally with the alias before you would have to include datadir and user to run it as but service runs as user gridcoin so it is not needed. made GRCAPP so it'd take up less space each line. now it performs as it should for me. any ideas what i did wrong or? It kept saying grc command not found.
I had one hell of a time getting alias to work and failed. I had the alias in .bashrc and it worked great with old source stats.sh method.
however as a service on ubuntu 16.04 the systemctl would not find grc command at all. I had to make a work around for myself. I don't know if I'm doing something wrong or what but any input would be nice.
The changes I made so it would work:
!/bin/bash
if pgrep "gridcoin" > /dev/null then GRCAPP='/usr/bin/gridcoinresearchd' GRCPATH='/home/gridcoin/.GridcoinResearch' "$GRCAPP" getinfo > "$GRCPATH"/getinfo.tmp && mv -f "$GRCPATH"/getinfo.tmp $ "$GRCAPP" getstakinginfo > "$GRCPATH"/getstakinginfo.tmp && mv -f "$GRCPATH$ "$GRCAPP" getdifficulty > "$GRCPATH"/difficulty.tmp && mv -f "$GRCPATH"/dif$ else
echo "Gridcoin is not running!"
fi
normally with the alias before you would have to include datadir and user to run it as but service runs as user gridcoin so it is not needed. made GRCAPP so it'd take up less space each line. now it performs as it should for me. any ideas what i did wrong or? It kept saying grc command not found.