Update zoraxy.sh (#3044)

This commit is contained in:
cvroque 2024-05-23 11:53:56 -03:00 committed by GitHub
parent 6b33fdd9f5
commit 326f9f500b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 1 deletions

View File

@ -55,7 +55,19 @@ function default_settings() {
function update_script() { function update_script() {
header_info header_info
if [[ ! -d /opt/zoraxy/src ]]; then msg_error "No ${APP} Installation Found!"; exit; fi if [[ ! -d /opt/zoraxy/src ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_error "There is currently no update path available." msg_info "Updating $APP"
systemctl stop zoraxy
cd /opt/zoraxy/src
if ! git pull; then
echo "Already up to date."
systemctl start zoraxy
echo "No update required."
exit
fi
go mod tidy
go build
systemctl start zoraxy
msg_ok "Updated $APP"
exit exit
} }