Hi i have a Ethereum node running and mining on a terminal in linux. i want to create a script that will start up the node.sh roughly 2 minutes after startup. my scripts is in the home/chainskills/private/startnode.sh. i want this to be executed after startup. I have barely any knowledge of linux. Please help me. i was told to go and create a script in the etc/init.d directory but i dont know how to. i am running this on a ubuntu 18 on a mini-mac.
Hi again... sorry I could not get back to you sooner. Working 12-hr shifts sometimes offers easy days, and sometimes not.
And since no one else has chimed in yet, let's try to see what we can do to get started. Since you're new to Linux, one thing you will quickly learn is that there is almost always more than one way to do anything. So I might start you off in one direction, then someone else with more knowledge and experience will hopefully set you straight!
In your opening paragraph, you seem to be saying that you want to create a script (startnode) to call up another script (node).... any particular reason for that? Why not just call up the script you want to run... node.sh... after your desired 2 minute delay?
You say your node is running and mining.... and I want to confirm that. Node.sh is, in fact, working properly.... right? One question that may come up is: Does node.sh need to run as root? That is, when you run this script, does it require a password to continue? And to be clear, does it need the root password or your user password (if they are different)?
Because you are dealing with a cryptocurrency application, I don't want to steer you wrong or have you make any mistakes that might compromise the security of your script. This stuff is way over my head.
I have just a little knowledge about running scripts at startup, or can figure stuff out from Google instructions, but you should definitely be thinking about security with this task. You may hear from
@Rob or
@JasKinasis or others who have far greater knowledge/skill than me. But your answers to my questions above may be helpful to them as well.
Okay, enough for now... I'm off to bed.
Cheers