NFC door lock
apt install python3-pip python3-systemd build-essential openssl
cd /opt/
git clone https://github.com/KSIUJ/nfc-lock
pip3 install -r requirements.txt
mkdir crt
openssl req -x509 -newkey rsa:4096 -keyout cert/$(hostname).key -out cert/$(hostname).crt -nodes -days 365
cp -r config-example/ config
, change relevant values inconfig
- Create
/etc/systemd/system/nfc-lock.service
, contents below systemctl daemon-reload; systemctl enable nfc-lock; systemctl restart nfc-lock
/etc/systemd/system/nfc-lock.service
:
[Unit]
Description=NFC door lock
After=multi-user.target
[Service]
Type=simple
WorkingDirectory=/opt/nfc-lock
ExecStart=/usr/bin/python3 -u /opt/nfc-lock/app.py
Restart=always
[Install]
WantedBy=multi-user.target
Remember to adjust WorkingDirectory
and ExecStart