Username: Password:

Author Topic: Rasberry PI Autostart Gunbot  (Read 12131 times)

Offline kazo1

  • Rookie
  • *
  • Posts: 4
    • View Profile
Rasberry PI Autostart Gunbot
« on: June 20, 2018, 06:55:28 AM »
Hi All

Has anyone devised a working method to get Gunbot to auto start on a raspberry PI i.e gunthy-arm. Ive tried quite a few methods only to find different types of errors. I am currently trying a native method perhaps its my syntax as im trying to learn as I go along.
The method i am trying is using systemd and a simple shell script. My Shell script looks like this

!/bin/sh
DISPLAY=:0 sudo lxterminal -e  /home/pi/gunthy-gui

Please note ive even tried different variotions of the above example screen. It only complicates the script with same result.

My .service file looks like this saved /etc/systemd/system

[Unit]
Description=My Service
After=network.target

[Service]
Type=simple
User=pi
ExecStart=/home/pi/myGunbot.sh
Restart=on-failure

[Install]
WantedBy=multi-user.target



The only thing that happens after running this is it somehow corrupts my .js file and i have to replace them in 3 places not to sure which one it uses. I replace them in
1. /home/pi/
2. /home/pi/arm/
3./home/pi/arm/setups/####.../

I then have to startup the gui stop it make sure the above config.js is correct to my understanding in all three places again then manually kick off gunthy-arm from 3rd step above using pi in a terminal window to get it working again.

My service starts but nothing happens in background. im currently seeing from above auto execute using systemctl start/restart is:

I see a terminal opening but when i run a query on cryptosight to chk it i dont see any replies telling me the bot is active.

When i manually try and start my gunthy-arm again it gives me this error
"
/snapshot/Gunbot-master/node_modules/bluebird/js/release/async.js:61
        fn = function () { throw arg; };
                           ^

TypeError: Cannot read property 'indicators' of undefined
    at Object.<anonymous> (/snapshot/Gunbot-master/tulind/index.js:0:0)
    at Module._compile (pkg/prelude/bootstrap.js:1230:22)
    at Object.Module._extensions..js (module.js:623:10)
    at Module.load (module.js:531:32)
    at tryModuleLoad (module.js:494:12)
    at Function.Module._load (module.js:486:3)
    at Module.require (module.js:556:17)
    at Module.require (pkg/prelude/bootstrap.js:1140:31)
    at require (internal/module.js:11:18)
    at __dirname (/snapshot/Gunbot-master/gain.js:0:0)
    at Object.<anonymous> (/snapshot/Gunbot-master/gain.js:0:0)
    at Module._compile (pkg/prelude/bootstrap.js:1230:22)
    at Object.Module._extensions..js (module.js:623:10)
    at Module.load (module.js:531:32)
    at tryModuleLoad (module.js:494:12)
    at Function.Module._load (module.js:486:3)
    at Module.require (module.js:556:17)
    at Module.require (pkg/prelude/bootstrap.js:1140:31)
    at require (internal/module.js:11:18)
    at module.(anonymous function).Y6O (/snapshot/Gunbot-master/requirefix.js:0:0)
    at Bot.W2X._.(anonymous function).Promise.(anonymous function) (/snapshot/Gunbot-master/bot.gunbot.js:0:0)
    at tryCatcher (/snapshot/Gunbot-master/node_modules/bluebird/js/release/util.js:16:23)
    at Promise.module.exports.Promise._settlePromiseFromHandler (/snapshot/Gunbot-master/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise.module.exports.Promise._settlePromise (/snapshot/Gunbot-master/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise.module.exports.Promise._settlePromise0 (/snapshot/Gunbot-master/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise.module.exports.Promise._settlePromises (/snapshot/Gunbot-master/node_modules/bluebird/js/release/promise.js:693:18)
    at Async._drainQueue (/snapshot/Gunbot-master/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/snapshot/Gunbot-master/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.__dirname.Async.drainQueues (/snapshot/Gunbot-master/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:785:20)
    at tryOnImmediate (timers.js:747:5)
    at processImmediate [as _immediateCallback] (timers.js:718:5)
"


Offline kazo1

  • Rookie
  • *
  • Posts: 4
    • View Profile
Re: Rasberry PI Autostart Gunbot
« Reply #1 on: June 21, 2018, 12:44:36 PM »
I managed to get this script to work. The only difference is i removed the sudo to start the terminal and added a 30sec sleep to allow it to start after boot