worked on scripts

This commit is contained in:
EggMan20339 2024-05-06 23:18:45 -04:00
parent 772364f0a7
commit 9442566665
2 changed files with 22 additions and 4 deletions

18
install.sh Normal file
View File

@ -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

View File

@ -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"
screen -dmS DoorAuth bash -c "cd /CNSA/CNSA-276-FP/ && python3 main.py"