From: Roland Häder Date: Thu, 29 Jun 2023 07:52:06 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=14444cd28709acbbdda1b767aaa29a1d916f5b42;p=fba.git Continued: - daemon.py can be easily executable - also need to rename it in __main__ --- diff --git a/check-daemon.sh b/check-daemon.sh index 91fb023..cce1339 100755 --- a/check-daemon.sh +++ b/check-daemon.sh @@ -5,5 +5,5 @@ CHECK=$(screen -list|grep daemon) if [ -z "${CHECK}" ] then echo "$0: Daemon isn't running, starting in background ..." - screen -dmS daemon python3 daemon.py + screen -dmS daemon ./daemon.py fi diff --git a/daemon.py b/daemon.py old mode 100644 new mode 100755 index 282b681..7ec401f --- a/daemon.py +++ b/daemon.py @@ -1,3 +1,6 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- + # Fedi API Block - An aggregator for fetching blocking data from fediverse nodes # Copyright (C) 2023 Free Software Foundation # @@ -363,4 +366,4 @@ def robots(request: Request): }) if __name__ == "__main__": - uvicorn.run("api:router", host=config.get("host"), port=config.get("port"), log_level=config.get("log_level")) + uvicorn.run("daemon:router", host=config.get("host"), port=config.get("port"), log_level=config.get("log_level"))