Compare commits

...

2 Commits

Author SHA1 Message Date
EggMan20339
0b5197e546 modified script storage path 2024-05-09 21:32:22 -04:00
EggMan20339
002ab064b7 gpio true 2024-05-09 21:25:06 -04:00
3 changed files with 12 additions and 4 deletions

View File

@ -8,17 +8,23 @@ sudo apt-get install python3-fido2 -y
sudo apt-get install python3-nfcpy -y
sudo apt-get install screen -y
sudo apt-get update
sudo apt-get upgrade -y
sudo mkdir /user/CNSA
# Define crontab job
JOB="@reboot /bin/sh /user/CNSA/CNSA-276-FP/startup.sh"
JOB="@reboot /bin/sh /user/CNSA/script/startup.sh"
# Check if the job is already in the crontab and add it if it's not
( crontab -l | grep -F "$JOB" || echo "$JOB" ) | crontab -
sudo git clone https://gitea.eggtech.net/eggman20339/CNSA-276-FP.git /user/CNSA/CNSA-276-FP
sudo chmod 777 /user/CNSA/CNSA-276-FP/startup.sh
sudo mkdir /user/CNSA/script
sudo cp /user/CNSA/CNSA-276-FP/startup.sh /user/CNSA/script/startup.sh
sudo chmod 777 /user/CNSA/script/startup.sh
pip3 install --upgrade fido2 --break-system-packages
pip3 install nfcpy --break-system-packages

View File

@ -33,7 +33,7 @@ On Windows, the native WebAuthn API will be used.
"""
import time
import configparser
gpie = False
gpie = True
if gpie:
import RPi.GPIO as GPIO
import pickle

View File

@ -28,3 +28,5 @@ sudo chmod 777 /user/CNSA/CNSA-276-FP/startup.sh
sudo cp /config.bak /user/CNSA/CNSA-276-FP/config.ini
screen -dmS DoorAuth bash -c "cd /user/CNSA/CNSA-276-FP/ && python3 main.py"
sudo cp /user/CNSA/CNSA-276-FP/startup.sh /user/CNSA/script/startup.sh