diff options
author | xengineering <mail2xengineering@protonmail.com> | 2021-02-12 17:10:48 +0100 |
---|---|---|
committer | xengineering <mail2xengineering@protonmail.com> | 2021-02-12 17:10:48 +0100 |
commit | 7c461d3ed31a1805b30e5701873ad702a64ba0de (patch) | |
tree | 9a8385976fb68f23d3077c6d034b4ae899559bf6 | |
parent | 9e6ae70d26f5c48e9ef6a9d328709bb618304469 (diff) | |
download | web-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.py | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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(): |