I'm on macOS and I do the following to accomplish what you are asking:
Create a file called run_monerod.sh
that contains the following:
#!/bin/bash
/Full/path/to/monerod --rpc-bind-port 11111
I create this from the Terminal by typing nano run_monerod.sh
and then typing the other bit, then saving with cntl+x
, y
, enter
. Finally I make the shell script executable by typing
chmod +x run_monerod.sh
Now I can call it with
./run_monerod.sh
and it runs detached on a different port, instead of having to type all that in every time.
Okay, so what's going on here?
- the
#!/bin/bash
is called the "shebang", and basically tells your Mac "hey, this is a bash script." It's not really that necessary, but useful nonetheless.
nano
is just a really simple text editor that can be used from the terminal
chmod +x
says "make this executable."
Now, to run your wallet, you could do something similar... Make a file called run_wallet_cli.sh
with the same shebang but instead of including the stuff for monerod, include the stuff for monero-wallet-cli that you usually type in the terminal when you're opening the wallet. Lastly, make it executable. When you want to use your wallet, run the monerod script, then once it's open, run the wallet script.
Bonus since macOS:
If you want to be able to click-to-run your scripts instead of running them in the command line, save them as .command
instead of .sh
. then just click on them in the Finder and have at it!