🗝
summary refs log tree commit diff
diff options
context:
space:
mode:
authormia <mia@mia.jetzt>2024-09-01 19:08:09 -0700
committermia <mia@mia.jetzt>2024-09-01 19:08:09 -0700
commite6416a52c32076c7d19b0e5f6740366a814d5f31 (patch)
tree7146c8fad55cbec4d48b85b8d7a6541117ee45a7
parent66a6fcd862cbb4b4505fab2bcd1d0b6a4ae06535 (diff)
downloadcallosum-e6416a52c32076c7d19b0e5f6740366a814d5f31.tar.gz
callosum-e6416a52c32076c7d19b0e5f6740366a814d5f31.zip
fix nginx not being restarted properly
-rw-r--r--misc/certs.py4
-rw-r--r--nginx/sync.py4
2 files changed, 5 insertions, 3 deletions
diff --git a/misc/certs.py b/misc/certs.py
index 889ef33..2b3e9a1 100644
--- a/misc/certs.py
+++ b/misc/certs.py
@@ -3,7 +3,7 @@ from tarfile import TarFile
 
 from commia.bearer import get_key, keys
 from commia.prelude import *
-from commia.ssh import scp
+from commia.ssh import scp, ssh_args
 from commia.util import with_written
 
 buffer = get_key(keys.certificates.certs, decode=False)
@@ -13,3 +13,5 @@ for name in tar.getnames():
         tar.extractfile(name).read(),
         lambda path: scp(path, f"callosum:/etc/tls/{name}"),
     )
+
+run_check(p([*ssh_args("callosum"), "systemctl", "restart", "nginx"]))
diff --git a/nginx/sync.py b/nginx/sync.py
index 8387e99..abd7e18 100644
--- a/nginx/sync.py
+++ b/nginx/sync.py
@@ -19,5 +19,5 @@ config = Path("nginx/nginx.conf").read_text().replace("%SERVERS%", servers_inden
 
 with_written(config, lambda path: scp(path, "callosum:/etc/nginx/nginx.conf"))
 
-if run(p([*ssh_args(), "nginx", "-t"])).returncode == 0:
-    run_check(p([*ssh_args(), "systemctl", "restart", "nginx"]))
+if run(p([*ssh_args("callosum"), "nginx", "-t"])).returncode == 0:
+    run_check(p([*ssh_args("callosum"), "systemctl", "restart", "nginx"]))