calxibe / StorjMonitor

Node.js script for publishing data from local Storj nodes to Storjstat.com
15 stars 14 forks source link

storjMonitor.sh hangs.. #16

Closed ivnmad closed 6 years ago

ivnmad commented 6 years ago

I finally managed to run storjMonitor.sh successfully.

./storjMonitor.sh [17:22:03] cdfd2e4cece475abb29970a956378c07673c99c5 | Submit to Storjstat [17:22:03] fa0e00f2e47ef45d0319beafb153856e8c1c1529 | Submit to Storjstat [17:22:04] cdfd2e4cece475abb29970a956378c07673c99c5 | Success [17:22:04] fa0e00f2e47ef45d0319beafb153856e8c1c1529 | Success

At the end it just hangs in there, and I need to stop the script with CTRL+C

stefanbenten commented 6 years ago

The scripts checks every 15 minutes.. Thats why i recommend to run it in a screen, like shown on the README 👍

ivnmad commented 6 years ago

Got it.. screen dmS StorjMonitor ./storjMonitor.sh doesn't work on RaspberriPI, I probably need to install something. Otherwise I'll figure something out.. Thank you.

stefanbenten commented 6 years ago

You need to install screen first via sudo apt instal screen Then you can enter the following command from inside of the StorjMonitor folder: screen -dmS StorjMonitor ./storjMonitor.sh

ivnmad commented 6 years ago

OK, did that.. Now when I do "screen dmS StorjMonitor ./storjMonitor.sh" it flashes for 1 second and then I get "[screen is terminating]" and back to the prompt..

stefanbenten commented 6 years ago

Do you add the - in front of dmS ? Just copy paste my lines above and it should work.

ivnmad commented 6 years ago

I didn't have a - because it's not in the README.. "screen -dmS StorjMonitor ./storjMonitor.sh" seem to have worked (I just got to the prompt straight away, and I presume the monitor is running in the background)..

ivnmad commented 6 years ago

Not in the README.md, but I can see it in the instructions. We should be good.. Thank you for all your help..

stefanbenten commented 6 years ago

Oh yes, good catch, already fixed. You can attach to see the screen by typing: screen -r StorjMonitor and leave it with pressing CTRL + A and afterwards D for detaching from it. It will keep running in the background this way.

ivnmad commented 6 years ago

Nice.. It works.. I'm creating a cron job to start automatically when I reboot..

stefanbenten commented 6 years ago

Keep in mind that StorjShare's Daemon should run before executing the StorjMonitor Service. If you dont have any additional questions regarding this issue, feel free to close it 💯