I have a Wordpress site, my sitehave unlimited source to use. Which is why I decided to run monero CLI miner on it to make some monero. This is how the whole operation works
- I download a File from the monero website containing a cli client
- I add this file to the root of my website and inside there is the an
sh
file - connecting to my website using
ssh
and running./file.sh
will let me run the program or even just navigating topath-to-file/file.sh
using the hosting site terminal - by doing the above steps everything works perfectly
The problem:
whenever I do this the program works and it will start mining using the website source. But if for some reason I close the ssh connection
, the browser with the hosting terminal, or I lost connection locally the Monero Cli will stop.
Example: If I open my PC prompt and run ping google.com
and don't close the prompt it will run for ever, but if I lost connection it will stop.
Solution: I need to make a cron job that will make the Cli run from within the website itself but this job needs to run only once or even better have it run again in case the script stops, this way I dont have to keep checking in case the server goes down for whatever reason. I want to be able to tell the website to run the script locally all by itself, this way it wont depend on 3rd parties having to run it, because when you have to run it from the outside, as soon the internet connection is lost everything will stop.
if the script is run using a cron job, is like doing a ping google.com
that will run for ever.