Skip to content

Commit

Permalink
deploy.sh: add sudo command
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Dec 6, 2021
1 parent af837ea commit b0314ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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..."
Expand All @@ -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!"

0 comments on commit b0314ef

Please sign in to comment.