From bf4882400c6210753686aadbf1c8fa8265d74222 Mon Sep 17 00:00:00 2001 From: Greg Burri Date: Sun, 23 Jun 2024 23:58:17 +0200 Subject: [PATCH] Avoid systemd in user mode --- deploy.nu | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/deploy.nu b/deploy.nu index 7589874..ae8f52f 100644 --- a/deploy.nu +++ b/deploy.nu @@ -18,12 +18,13 @@ def main [host: string, destination: string, ssh_key: path] { copy_ssh "ice/" $destination cargo build --target $target --release - invoke_ssh [systemctl --user stop mumble_web] + invoke_ssh [sudo systemctl stop mumble_web] copy_ssh ./target/($target)/release/mumble_web $destination invoke_ssh [rm -rf $"($destination)/static"] copy_ssh ./static/ $destination - invoke_ssh [chmod u+x $"($destination)/mumble_web"] - invoke_ssh [systemctl --user start mumble_web] + invoke_ssh [chmod gu+x $"($destination)/mumble_web"] + invoke_ssh [chgrp -R www-data $"($destination)/mumble_web"] + invoke_ssh [sudo systemctl start mumble_web] print "Deployment finished" } -- 2.45.2