From: Greg Burri Date: Sun, 23 Jun 2024 21:58:17 +0000 (+0200) Subject: Avoid systemd in user mode X-Git-Url: http://git.euphorik.ch/index.cgi?a=commitdiff_plain;h=bf4882400c6210753686aadbf1c8fa8265d74222;p=mumble_web.git Avoid systemd in user mode --- 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" }