Ari Gerus | 1bcaa97 | 2024-03-19 18:35:00 +0100 | [diff] [blame^] | 1 | `Warsaw Hackerspace`_ presence tracker hosted on https://at.hackerspace.pl. It |
vuko | 3cd087d | 2021-12-28 13:19:40 +0100 | [diff] [blame] | 2 | uses dhcpd.leases file to track MAC adressess of devices connected to hs LAN |
| 3 | network. |
| 4 | |
vuko | 2afcbdd | 2021-12-28 15:07:47 +0100 | [diff] [blame] | 5 | This is running on `customs` machine. Go to |
| 6 | ``hswaw/machines/customs.hackerspace.pl`` to see how it is deployed. |
| 7 | |
vuko | 3cd087d | 2021-12-28 13:19:40 +0100 | [diff] [blame] | 8 | .. _Warsaw Hackerspace: https://hackerspace.pl |
| 9 | |
| 10 | Setup |
| 11 | ----- |
| 12 | .. code:: bash |
| 13 | |
Ari Gerus | 1bcaa97 | 2024-03-19 18:35:00 +0100 | [diff] [blame^] | 14 | cp config.dist.yaml config.yaml |
vuko | 2afcbdd | 2021-12-28 15:07:47 +0100 | [diff] [blame] | 15 | cp web-config.yaml.dist web-config.yaml |
vuko | 3cd087d | 2021-12-28 13:19:40 +0100 | [diff] [blame] | 16 | |
vuko | 2afcbdd | 2021-12-28 15:07:47 +0100 | [diff] [blame] | 17 | # edit config files using your favourite editor |
vuko | 3cd087d | 2021-12-28 13:19:40 +0100 | [diff] [blame] | 18 | $EDITOR config.yaml |
vuko | 2afcbdd | 2021-12-28 15:07:47 +0100 | [diff] [blame] | 19 | $EDITOR web-config.yaml |
vuko | 3cd087d | 2021-12-28 13:19:40 +0100 | [diff] [blame] | 20 | |
| 21 | # create new database file (or copy existing one) |
| 22 | sqlite3 at.db < dbsetup.sql |
| 23 | |
vuko | 2afcbdd | 2021-12-28 15:07:47 +0100 | [diff] [blame] | 24 | # build |
| 25 | nix-build ../../default.nix -A hswaw.checkinator |
vuko | 3cd087d | 2021-12-28 13:19:40 +0100 | [diff] [blame] | 26 | |
| 27 | Running |
| 28 | ------- |
| 29 | .. code:: bash |
| 30 | |
vuko | 2afcbdd | 2021-12-28 15:07:47 +0100 | [diff] [blame] | 31 | # run tracker |
| 32 | ./result/bin/checkinator-tracker config.yaml |
vuko | 3cd087d | 2021-12-28 13:19:40 +0100 | [diff] [blame] | 33 | |
vuko | 2afcbdd | 2021-12-28 15:07:47 +0100 | [diff] [blame] | 34 | # run web interface |
| 35 | # TODO: fix running debug entry point from nix build |
| 36 | ./result/bin/checkinator-web-debug |