OpenBazaar / OpenBazaar-Server

(Deprecated) OpenBazaar 1.0 Server daemon for communication with OpenBazaar-Client
MIT License
608 stars 173 forks source link

Reboot OpenBazaar Server automatically upon force-close or crash #482

Open IVXCVI opened 8 years ago

IVXCVI commented 8 years ago

Brief Description: I'm wondering what the best method would be to do what's stated in the title. I've included a link where the author described how to do this in Amazon AWS with Upstart, but that is not an option for me in my current version of Raspbian. I expect I need to convert the Upstart script to work with systemd, but my attempt in doing that has failed:

[Unit]
Description=OpenBazaar Server

[Service]
Environment=IP 0.0.0.0
WorkingDirectory=/home/pi/OpenBazaar-Server
ExecStart=/usr/bin/python ./openbazaard.py start -d -a $IP
Restart=always

[Install]
WantedBy=multi-user.target

Trying to connect with the client after starting the service fails.

If I'm pursuing the wrong course here, please let me know. Any help will be greatly appreciated.

Operating System (OS and version): Raspbian 4.1.14-v7+ OpenBazaar version: OpenBazaar Server v0.2.1 Hardware: Raspberry Pi 2

Additional info (links, images, etc go here): http://mariodian.com/blog/50/quick-and-easy-way-to-setup-openbazaar-server-on-amazon-aws

tyler-smith commented 8 years ago

Creating a systemd script is the correct IMO. But I don't personally know much about it. Try changing ExecStart=/usr/bin/python ./openbazaard.py start -d -a $IP to ExecStart=/usr/bin/python ./openbazaard.py start -d -a 0.0.0.0 and see if that works. If so, the issue is with setting the IP env var.

IVXCVI commented 8 years ago

Thanks for your input Tyler. Unfortunately, the client continues to fail to connect after that change.

On September 5, 2016 5:38:22 PM CDT, Tyler Smith notifications@github.com wrote:

Creating a systemd script is the correct IMO. But I don't personally know much about it. Try changing ExecStart=/usr/bin/python ./openbazaard.py start -d -a $IP to ExecStart=/usr/bin/python ./openbazaard.py start -d -a 0.0.0.0 and see if that works. If so, the issue is with setting the IP env var.

You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/OpenBazaar/OpenBazaar-Server/issues/482#issuecomment-244818248

Sent from my Android device with K-9 Mail. Please excuse my brevity.