]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Thu, 29 Jun 2023 07:52:06 +0000 (09:52 +0200)
committerRoland Häder <roland@mxchange.org>
Thu, 29 Jun 2023 07:57:06 +0000 (09:57 +0200)
- daemon.py can be easily executable
- also need to rename it in __main__

check-daemon.sh
daemon.py [changed mode: 0644->0755]

index 91fb0232a1abbefcd3448153df88408beed21771..cce13392edaac12c23edd2b332b82661bd978512 100755 (executable)
@@ -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
old mode 100644 (file)
new mode 100755 (executable)
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"))