summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <mail2xengineering@protonmail.com>2021-02-12 17:10:48 +0100
committerxengineering <mail2xengineering@protonmail.com>2021-02-12 17:10:48 +0100
commit7c461d3ed31a1805b30e5701873ad702a64ba0de (patch)
tree9a8385976fb68f23d3077c6d034b4ae899559bf6
parent9e6ae70d26f5c48e9ef6a9d328709bb618304469 (diff)
downloadweb-template-7c461d3ed31a1805b30e5701873ad702a64ba0de.tar
web-template-7c461d3ed31a1805b30e5701873ad702a64ba0de.tar.zst
web-template-7c461d3ed31a1805b30e5701873ad702a64ba0de.zip
Avoid systemd Unit Installation in case of no Framework
-rw-r--r--manage.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/manage.py b/manage.py
index c293106..351ede6 100644
--- a/manage.py
+++ b/manage.py
@@ -149,14 +149,16 @@ def uninstall_flask(settings):
def install_systemd_file(settings):
"""Install the Systemd Unit for launching the dynamic Web Server"""
- subprocess.call("sudo install -Dm 644 systemd/build/{0}.service /etc/systemd/system/{0}.service".format(settings["project_name"]), shell=True)
- subprocess.call("sudo systemctl daemon-reload", shell=True)
+ if settings["framework"] != None:
+ subprocess.call("sudo install -Dm 644 systemd/build/{0}.service /etc/systemd/system/{0}.service".format(settings["project_name"]), shell=True)
+ subprocess.call("sudo systemctl daemon-reload", shell=True)
def uninstall_systemd_file(settings):
"""Uninstall the Systemd Unit for launching the dynamic Web Server"""
- subprocess.call("sudo rm /etc/systemd/system/{0}.service".format(settings["project_name"]), shell=True)
+ if settings["framework"] != None:
+ subprocess.call("sudo rm /etc/systemd/system/{0}.service".format(settings["project_name"]), shell=True)
def main():