worked on scripts
This commit is contained in:
parent
772364f0a7
commit
9442566665
18
install.sh
Normal file
18
install.sh
Normal 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
|
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
sudo cp /home/user/CNSA/CNSA-276-FP/config.ini /config.bak
|
sudo cp /CNSA/CNSA-276-FP/config.ini /config.bak
|
||||||
sudo rm -R /home/user/CNSA/CNSA-276-FP
|
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
|
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"
|
Loading…
Reference in New Issue
Block a user