I am trying to run sendmytip.sh script as a cron job but I get the error saying:
line53: shelley: command not found
edited the script a little and realized, the command: cardano-cli shelley query tip --mainnet does not execute and can not be found. I dug into the crontab and realized, it’s running my the script in a restricted environment hence why cardano-cli commands can not be executed. But my question is, how do I provide a suitable path for cardano-cli commands to run in cron?
I hope this finds you well. I realise this comes a bit late, but I had a question precisely about running sendmytip.sh as a systemd service. When I run the script from the console, it has no dramas finding the socket environment variable. I setup a systemd unit as follows:
When I start the service, I get an error saying that cardano-cli was unable to locate the socket, like so:
Shelley command failed: query tip Error: Error while looking up environment variable: CARDANO_NODE_SOCKET_PATH Error: “CARDANO_NODE_SOCKET_PATH”
I find this strange, as I also run the cardano-node as a systemd service, and have had no issues with it not finding the environment variable. I have tried to change the sendmytip.sh script to point at the socket directly, but that has not fixed the problem.
I have also noted two more things:
my propagation times are consistently the slowest of the bunch on pooltool (when I manage to run sendmytip). Will this improve as I work on my topology files?
if I run the sendmytip script and put it in the background, it keeps running, but it will not send data to pooltool (eg, my tip stops being updated). Why is that?