From b0314ef74dcb1ec3a0585224cfe21b703d9fcaaf Mon Sep 17 00:00:00 2001 From: c9s Date: Mon, 6 Dec 2021 18:17:52 +0800 Subject: [PATCH] deploy.sh: add sudo command --- deploy.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy.sh b/deploy.sh index 7d538724f5..e8c08b8b56 100755 --- a/deploy.sh +++ b/deploy.sh @@ -113,7 +113,7 @@ END scp ".systemd.$target.service" "$host:$host_systemd_service_dir/$target.service" info "reloading systemd daemon..." - remote_run "systemctl daemon-reload && systemctl enable $target" + remote_run "sudo systemctl daemon-reload && systemctl enable $target" fi info "building binary: $bin_type-$host_os-$host_arch..." @@ -131,6 +131,6 @@ fi # link binary and restart the systemd service info "linking binary and restarting..." -ssh $host "(cd $target && ln -sf \$HOME/$host_bin_dir/bbgo-$tag bbgo && systemctl restart $target.service)" +ssh $host "(cd $target && ln -sf \$HOME/$host_bin_dir/bbgo-$tag bbgo && sudo systemctl restart $target.service)" info "deployed successfully!"