ci: switch prod deploy to server-side git pull and go build
This commit is contained in:
@@ -39,7 +39,7 @@ health_check() {
|
||||
}
|
||||
|
||||
restart_service() {
|
||||
if command -v systemctl >/dev/null 2>&1 && systemctl list-unit-files | grep -q "^${SERVICE_NAME}.service"; then
|
||||
if command -v systemctl >/dev/null 2>&1 && systemctl cat "${SERVICE_NAME}.service" >/dev/null 2>&1; then
|
||||
log "restarting systemd service: ${SERVICE_NAME}"
|
||||
systemctl restart "$SERVICE_NAME"
|
||||
else
|
||||
@@ -58,7 +58,7 @@ create_service_if_needed() {
|
||||
return 0
|
||||
fi
|
||||
|
||||
if systemctl list-unit-files | grep -q "^${SERVICE_NAME}.service"; then
|
||||
if systemctl cat "${SERVICE_NAME}.service" >/dev/null 2>&1; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user