Forks start batch file CLI

Hi I am farming in ubuntu 20.04, I am trying to create a batch file .sh to run the forks in cli mode, the think is that it start the daemons, but after a few seconds every fork closes. I am using the following commands:
cd ~/silicoin-blockchain/
. ./activate
sit start farmer
cd /

sleep 5

cd ~/taco-blockchain/
. ./activate
taco start farmer-no-wallet
cd /

Any help?

You need to launch that using the script with “PAUSE” at the end (so that the terminal wouldn’t close) or using crontab

Or execute the script in a screen session.

Check out Forktools for CLI: GitHub - Qwinn1/forktools: Several command line tools to greatly simplify CLI maintenance of one or many forks of Chia crypto coins

Or Machinaris for a WebUI:

The “PAUSE” command is not working.
And one more thing, when I am running the above commands by hand it’s working fine and I close the terminal at the end. So when I run the terminal the commands run ok, and after I close the terminal the daemons(node, farmer, wallet etc) work ok.

So when you run it by hand it works totally fine?

Yes. It works fine by hand.

And when I run the .sh file from cli with ./ its works fine. It does not work when I run the file from file manager with double click and run in terminal!!

Did you try creating a script for launching that file? So that a computer would think that you launch that manually

I dont know how to do this!

there are plenty ways to autostart that, you can find them on chia’s github page, but here is one of them using crontab:

@reboot cd ~/chia-blockchain && . ./activate && chia start farmer

command to edit crontab: sudo crontab -e