laurivosandi / sumochip

Sumorobot platform on top of CHIP board
MIT License
17 stars 13 forks source link

Add setup.py and systemd service #9

Closed artizirk closed 7 years ago

artizirk commented 7 years ago

Sumochip can now be installed using pip install sumochip although config file still has to be copied manualy to /etc/sumorobot because the new Wheel format that python pacakges use do not support post_install scripts so we can't really detect if the package is being installed to a virtualenv, as a user package or as a global system wide package. For that we need to create a proper .deb package.

There is also a sumochip.service file for systemd that by default is installed to sys.prefix/lib/systemd/system witch translates under debian to /usr/local/lib/systemd/system. systemctl start sumochip will start the sumochip web interface on port 80 and systemctl enable sumochip will autostart the webinterface on boot. I also experimented with some realtime flags but those will crash the chip if enabled.