diff --git a/README.md b/README.md index 619c777ed04f3dda652d3dfb7a150b3e5f6c6328..309c1918127a0caf60f1c7982280c9175d2af983 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ 4. `source ${HOME}/bfa/bin` - You can include this line in your .bash_profile if you want. - It is perfectly safe to source it multiple times. -5. Install this crontab: `@reboot bfa/network5445/start.sh` +5. Install this crontab: `@reboot bfa/bin/cron.sh` - If you are running a sealer you MUST do this. 6. run `start.sh`. This will start synchronizing and probably takes at least an hour. 7. Change your node's settings with `syncmode.sh` diff --git a/bin/cron.sh b/bin/cron.sh index c8070ead459090c4386e52145234b7489b4d75cd..e1f8ca4b2ab16b5f263554635cc3dbfd8cfebdac 100755 --- a/bin/cron.sh +++ b/bin/cron.sh @@ -1,13 +1,20 @@ #!/bin/bash trap 'exit 1' ERR +# Go $HOME +cd +# Log in home directory +exec < /dev/null > bfa-cron-output.log 2>&1 +# Go to script bin, 'cause we expect to find $BFAHOME/bin/env there cd `dirname $0` source ./env -exec < /dev/null > /dev/null 2> /dev/null ( ./start.sh & - while ./monitor.sh || true + # Yes, we wait 60 seconds after starting the server. + # If you don't want to wait, kill the sleep.. the || true + # will capture the ERR trap. + while sleep 60 || true do - sleep 60 + ./monitor.sh done & )