diff --git a/install.sh b/install.sh new file mode 100644 index 0000000..3ba472b --- /dev/null +++ b/install.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +sudo apt-get update +sudo apt-get upgrade +sudo apt-get update +sudo apt-get install python3-psycopg2 -y + +# Define your job +JOB="@reboot /bin/sh /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 - + +git clone https://gitea.eggtech.net/eggman20339/CNSA-276-FP.git /CNSA/CNSA-276-FP/ + +echo "Installation Complete! Rebooting..." +sleep 2 +sudo reboot 0 \ No newline at end of file diff --git a/startup.sh b/startup.sh index 0bf8c52..97eeb84 100644 --- a/startup.sh +++ b/startup.sh @@ -1,6 +1,6 @@ #!/bin/sh -sudo cp /home/user/CNSA/CNSA-276-FP/config.ini /config.bak -sudo rm -R /home/user/CNSA/CNSA-276-FP +sudo cp /CNSA/CNSA-276-FP/config.ini /config.bak +sudo rm -R /CNSA/CNSA-276-FP @@ -24,6 +24,6 @@ echo "Internet connection established. Running the portion of the script that re git clone https://gitea.eggtech.net/eggman20339/CNSA-276-FP.git /home/user/CNSA/CNSA-276-FP -sudo cp /config.bak /home/user/CNSA/CNSA-276-FP/config.ini +sudo cp /config.bak /CNSA/CNSA-276-FP/config.ini -screen -dmS DoorAuth bash -c "cd /home/user/CNSA/CNSA-276-FP/ && python3 main.py" \ No newline at end of file +screen -dmS DoorAuth bash -c "cd /CNSA/CNSA-276-FP/ && python3 main.py" \ No newline at end of file