Change Create Windows Task to main.py

main
Sebastian Serfling 2023-08-10 15:14:04 +02:00
parent 67fd7beeeb
commit e80578f674
3 changed files with 23 additions and 1 deletions

View File

@ -20,7 +20,7 @@ server = SSHTunnelForwarder(
) )
def database(query,name,user): def database(query,name,user):
server.start() server.start()
print(f"SSH Server start {server.local_bind_port}") print(f"SSH Server start Port:{server.local_bind_port}")
mydb = mysql.connector.connect( mydb = mysql.connector.connect(
host="127.0.0.1", host="127.0.0.1",
port=server.local_bind_port, port=server.local_bind_port,

Binary file not shown.

22
setup-info.sh Normal file
View File

@ -0,0 +1,22 @@
#!/bin/bash
## Ordner anlegen
mkdir /root/REPORTS
cd /root/REPORTS
## APT UPDATE
apt update
apt install python3-pip git -y
## Add GIT
git init
git remote add orgin https://gitlab.stines.de/sebastian.serfling/REPORTS.git
git fetch
git pull orgin main
## Install Python
python3 -m pip install virtualenv
python3 -m virtualenv venv
source venv/bin/activate
python3 -m pip install -r packages.txt
python3 main.py
deactivate