diff --git a/autoclean-xygt.service b/autoclean-xygt.service deleted file mode 100644 index 23bbed5..0000000 --- a/autoclean-xygt.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Runs every minute to autoclean xygt. -StartLimitIntervalSec=0 - -[Service] -Type=simple -Restart=always -RestartSec=1 -User=root -ExecStart=/usr/bin/autoclean.py - -[Install] -WantedBy=multi-user.target \ No newline at end of file diff --git a/install.sh b/install.sh index e085efd..1a6a95d 100755 --- a/install.sh +++ b/install.sh @@ -7,12 +7,4 @@ fi apt install mongodb-org python3-pip python3-venv -systemctl enable --now mongod - -cp autoclean-xygt.service /lib/systemd/system/ -cp autoclean.py /usr/bin/ -cp config.py /usr/bin/ - -systemctl enable --now autoclean-xygt.service - echo "Installation complete, launch xygt with ./run.py (in the venv)" \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 1132281..f5e23fb 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,4 +4,5 @@ pymongo python-magic flask-login flask-bcrypt -flask-wtf \ No newline at end of file +flask-wtf +waitress \ No newline at end of file diff --git a/run.py b/run.py index 1a175db..969665d 100755 --- a/run.py +++ b/run.py @@ -1,9 +1,7 @@ #!/usr/bin/env python3 -# Run the app - MADE FOR SYSTEMD SERVICE from app import app +from waitress import serve if __name__ == '__main__': - app.run(host='0.0.0.0', debug=False) - -######################################## \ No newline at end of file + serve(app, listen='*:5000')