Update INSTALL.sh

This commit is contained in:
Stefan Pejcic 2024-11-13 13:54:30 +01:00 committed by GitHub
parent 1d997be4c3
commit 8167667c34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,24 +1,22 @@
#!/bin/bash
#apt install python3-pip
apt install python3-pip #pip install /home/screenshot/requirements.txt
apt /home/screenshot/requirements.txt
# DEV venv/bin/python -m flask run --host=0.0.0.0 -p 80 # DEV venv/bin/python -m flask run --host=0.0.0.0 -p 80
cd /home/screenshot/ cd /home/screenshot/
python3 -m venv venv python3 -m venv venv
apt install python3.12-venv apt install python3.12-venv
source venv/bin/ source venv/bin/
apt install python3-pip
apt install python3-playwright apt install python3-playwright
pip install /home/screenshot/requirements.txt
# limit access to proxy only!
: '
62 sudo ufw reset 62 sudo ufw reset
63 ufw default deny incoming 63 ufw default deny incoming
64 ufw default allow outgoing 64 ufw default allow outgoing
@ -28,8 +26,13 @@ apt install python3-playwright
96 ufw allow from 10.116.0.5 96 ufw allow from 10.116.0.5
97 ufw allow from 24.144.64.6 97 ufw allow from 24.144.64.6
113 ufw reload 113 ufw reload
'
# add cron
chmod +x /home/screenshot/start.sh
cronjob="@reboot /bin/bash /home/screenshot/start.sh"
(crontab -l 2>/dev/null | grep -v -F "$cronjob"; echo "$cronjob") | crontab -
# start
# @reboot /bin/bash /home/screenshot/start.sh bash /home/screenshot/start.sh