vuko | 3cd087d | 2021-12-28 13:19:40 +0100 | [diff] [blame^] | 1 | `Warsaw Hackerspace`_ presence tracker hosted on https://at.hackersapce.pl. It |
| 2 | uses dhcpd.leases file to track MAC adressess of devices connected to hs LAN |
| 3 | network. |
| 4 | |
| 5 | .. _Warsaw Hackerspace: https://hackerspace.pl |
| 6 | |
| 7 | Setup |
| 8 | ----- |
| 9 | .. code:: bash |
| 10 | |
| 11 | cp config.yaml.dist config.yaml |
| 12 | |
| 13 | # edit config file using your favourite editor |
| 14 | $EDITOR config.yaml |
| 15 | |
| 16 | # create new database file (or copy existing one) |
| 17 | sqlite3 at.db < dbsetup.sql |
| 18 | |
| 19 | # create python virtual environment |
| 20 | python3 -m venv vevnv |
| 21 | ./venv/bin/python3 -m pip install -r requirements |
| 22 | ./venv/bin/python3 -m pip install gunicorn |
| 23 | |
| 24 | Running |
| 25 | ------- |
| 26 | .. code:: bash |
| 27 | |
| 28 | ./venv/bin/gunicorn run:app |
| 29 | |
| 30 | When running on OpenBSD make sure to pass '--no-sendfile' argument to gunicorn |
| 31 | command. This will prevent AttributeError on os.sendfile that seems to be |
| 32 | missing in this marvelous OS-es python3 stdlib. |