IPRoyal / pawns-cli

10 stars 3 forks source link

Raspberry RUN alltime IPROYAL #5

Open t3uch1 opened 2 years ago

t3uch1 commented 2 years ago

Hello I use IPRoyal on Raspberry PI, it works well, I type the command in SSH from my phone and it launches well, problem as soon as I cut the SSH it stops, How do I get my Raspberry to continue 24/7 running IPRoyal? TY

nuevothetaprimero commented 2 years ago

Try using the screen command

RaulRohjans commented 2 years ago

instead of using screen, place the pawns-cli on your home, then type "crontab -e" without the quotes. Select your editor and write the following:

@reboot ./pawns-cli -email=email@example.com -password=change_me -device-name=raspberrypi -accept-tos

Dont forget to change the email and password to yours.

HDTS1 commented 1 year ago

I like to run it as a service: /etc/systemd/system/iproyalpawns.service

[Unit]
Description=Start IP Royal Pawns daemon

[Service]
Type=simple
ExecStart=/bin/bash /home/pi/pawnstart.sh
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target

I can then enable service on reboot: sudo systemctl enable iproyalpawns

and check on it anytime by asking for status for example: sudo service iproyalpawns status/start/stop

also, the /home/pi/pawnstart.sh you see in a .service file has just this inside: pawns-cli -email=youremail@mail.com -password=YourPassword -device-name=RPi2 -accept-tos