Change Create Windows Task to main.py
parent
67fd7beeeb
commit
e80578f674
|
|
@ -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,
|
||||||
|
|
|
||||||
BIN
packages.txt
BIN
packages.txt
Binary file not shown.
|
|
@ -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
|
||||||
Loading…
Reference in New Issue