40 lines
1.5 KiB
Markdown
40 lines
1.5 KiB
Markdown
# sarah_rfid_lab_access
|
|
|
|
Sarah
|
|
(Simple Access for RFID Authenticated Homes)
|
|
|
|
Dies ist das Backend vom doorknob reader. Dieser regelt wer ins FET lab darf und wer nicht.
|
|
Bei Fragen wende dich gerne ans Lab-Team (lab@fet.at).
|
|
|
|
Geschrieben von Kourosh (aladdin@fet.at)
|
|
Erweitert von Peter (pet@fet.at)
|
|
|
|
Läuft auf einem raspberry pi, mit einem PN532 über I2C verbunden.
|
|
|
|
Der Watchdog ist sehr simpel und prüft nur ob das Python-Skript noch antwortet. Wenn der Raspi abgesteckt wird, kein Internet mehr hat, oder etwas anderes schief läuft versagt das.
|
|
|
|
|
|
###Setup
|
|
|
|
Braucht folgende sachen im "sudo crontab -e":
|
|
|
|
```
|
|
0 1 * * * sudo reboot #reboot the machine every day at 01:00
|
|
* * * * * sudo python /home/zutritt/Documents/sarah/sarah_crontab_sytem_functions.py #open the system functions once a minute, to check if we need to reboot:
|
|
*/5 * * * * sudo python /home/zutritt/Documents/sarah/src/sarahs_watchdog.py > /home/zutritt/logs/cronlog_watchdog 2>&1 #run the watchdog once every 5 minutes to chekc if sarah is online
|
|
|
|
@reboot sh /home/zutritt/launcher.sh > /home/zutritt/logs/cronlog 2>&1
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
###Website
|
|
setzt eine funktionierende apache config voraus, dann den ordner "website_data" nach "/var/www/" kopieren. für die .htaccess allow rewrite enablen (/etc/apache2/apache2.config)
|
|
|
|
###Reader
|
|
Python und stuff installieren, dann den ordner "reader_data" nach "/home/zutritt/Documents/sarah" kopieren
|
|
|
|
###Finale inbetriebnahme
|
|
raspi neustarten, dann sollte sich "/home/zutritt/Documents/sarah/logs" befüllen |