Add chatwoot deploy scipts

This commit is contained in:
Christian Hagenest 2024-03-12 13:27:22 +01:00
parent e49bb43211
commit a19709566a

View file

@ -18,7 +18,6 @@ def deploy_nginx():
packages = ["nginx-extras"], packages = ["nginx-extras"],
) )
def add_nginx_domain(domain: str, config_path: str = None, proxy_port: int = None, enabled=True, acmetool=True): def add_nginx_domain(domain: str, config_path: str = None, proxy_port: int = None, enabled=True, acmetool=True):
"""Let a domain be handled by nginx, create a Let's Encrypt certificate for it, and deploy the config. """Let a domain be handled by nginx, create a Let's Encrypt certificate for it, and deploy the config.
@ -68,13 +67,11 @@ def add_nginx_domain(domain: str, config_path: str = None, proxy_port: int = Non
present=enabled, present=enabled,
) )
if config.changed or config_link.changed: if config.changed or config_link.changed:
need_restart = True
systemd.service( systemd.service(
name="NGINX should be enabled and running", name="NGINX should be enabled and running",
service="nginx.service", service="nginx.service",
running=True, running=True,
enabled=True, enabled=True,
restarted=need_restart, restarted=True,
) )