Skip to content
This repository has been archived by the owner on Apr 17, 2020. It is now read-only.

start web server on reboot #26

Open
icepicknz opened this issue Jul 4, 2018 · 1 comment
Open

start web server on reboot #26

icepicknz opened this issue Jul 4, 2018 · 1 comment

Comments

@icepicknz
Copy link

Thanks so much for your wonderful API; i'm just building this into my smart things hub using the inbuilt web server and its all working great.

Do you mind advising (and adding to your documentation) the method to start at reboot, for instance I need to start the following but not sure how to do the virtualenv -p python3 husmow_venv and then to start; would it be a bash script or something?
husmow --login [email protected] --password password123 server --address 192.168.1.9

@maglub
Copy link

maglub commented Jul 20, 2018

This of course depends on what distro/OS you are running.

  • Prepare your system as per README:
sudo apt-get install python3 virtualenv
virtualenv -p python3 husmow_venv
source husmow_venv/bin/activate
pip3 install pyhusmow
  • Create a wrapper script: I call mine ~/automower/bin/startHusmowServer, chmod:ed to 755
#!/bin/bash

. ~/husmow_venv/bin/activate

husmow --login [email protected] --password password123 server --address=0.0.0.0
  • In (for example) Ubuntu, create a crontab entry (crontab -e)
@reboot ~/automower/bin/startHusmowServer >/dev/null 2>&1 &

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants