mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-02-16 18:23:27 +01:00
Compare commits
3 Commits
automated/
...
github-act
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2a98f257a8 | ||
|
|
896714e06f | ||
|
|
96389a02cb |
@@ -422,6 +422,7 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
|||||||
|
|
||||||
- #### 🔧 Refactor
|
- #### 🔧 Refactor
|
||||||
|
|
||||||
|
- core/vm's: ensure script state is sent on script exit [@MickLesk](https://github.com/MickLesk) ([#11991](https://github.com/community-scripts/ProxmoxVE/pull/11991))
|
||||||
- Vaultwarden: export VW_VERSION as version number [@MickLesk](https://github.com/MickLesk) ([#11966](https://github.com/community-scripts/ProxmoxVE/pull/11966))
|
- Vaultwarden: export VW_VERSION as version number [@MickLesk](https://github.com/MickLesk) ([#11966](https://github.com/community-scripts/ProxmoxVE/pull/11966))
|
||||||
- Zabbix: Improve zabbix-agent service detection [@MickLesk](https://github.com/MickLesk) ([#11968](https://github.com/community-scripts/ProxmoxVE/pull/11968))
|
- Zabbix: Improve zabbix-agent service detection [@MickLesk](https://github.com/MickLesk) ([#11968](https://github.com/community-scripts/ProxmoxVE/pull/11968))
|
||||||
|
|
||||||
|
|||||||
@@ -135,19 +135,44 @@ explain_exit_code() {
|
|||||||
# --- Generic / Shell ---
|
# --- Generic / Shell ---
|
||||||
1) echo "General error / Operation not permitted" ;;
|
1) echo "General error / Operation not permitted" ;;
|
||||||
2) echo "Misuse of shell builtins (e.g. syntax error)" ;;
|
2) echo "Misuse of shell builtins (e.g. syntax error)" ;;
|
||||||
|
10) echo "Docker / privileged mode required (unsupported environment)" ;;
|
||||||
|
|
||||||
# --- curl / wget errors (commonly seen in downloads) ---
|
# --- curl / wget errors (commonly seen in downloads) ---
|
||||||
|
4) echo "curl: Feature not supported or protocol error" ;;
|
||||||
|
5) echo "curl: Could not resolve proxy" ;;
|
||||||
6) echo "curl: DNS resolution failed (could not resolve host)" ;;
|
6) echo "curl: DNS resolution failed (could not resolve host)" ;;
|
||||||
7) echo "curl: Failed to connect (network unreachable / host down)" ;;
|
7) echo "curl: Failed to connect (network unreachable / host down)" ;;
|
||||||
|
8) echo "curl: FTP server reply error" ;;
|
||||||
22) echo "curl: HTTP error returned (404, 429, 500+)" ;;
|
22) echo "curl: HTTP error returned (404, 429, 500+)" ;;
|
||||||
|
23) echo "curl: Write error (disk full or permissions)" ;;
|
||||||
|
25) echo "curl: Upload failed" ;;
|
||||||
28) echo "curl: Operation timeout (network slow or server not responding)" ;;
|
28) echo "curl: Operation timeout (network slow or server not responding)" ;;
|
||||||
|
30) echo "curl: FTP port command failed" ;;
|
||||||
35) echo "curl: SSL/TLS handshake failed (certificate error)" ;;
|
35) echo "curl: SSL/TLS handshake failed (certificate error)" ;;
|
||||||
|
56) echo "curl: Receive error (connection reset by peer)" ;;
|
||||||
|
75) echo "Temporary failure (retry later)" ;;
|
||||||
|
78) echo "curl: Remote file not found (404 on FTP/file)" ;;
|
||||||
|
|
||||||
# --- Package manager / APT / DPKG ---
|
# --- Package manager / APT / DPKG ---
|
||||||
100) echo "APT: Package manager error (broken packages / dependency problems)" ;;
|
100) echo "APT: Package manager error (broken packages / dependency problems)" ;;
|
||||||
101) echo "APT: Configuration error (bad sources.list, malformed config)" ;;
|
101) echo "APT: Configuration error (bad sources.list, malformed config)" ;;
|
||||||
102) echo "APT: Lock held by another process (dpkg/apt still running)" ;;
|
102) echo "APT: Lock held by another process (dpkg/apt still running)" ;;
|
||||||
|
|
||||||
|
# --- BSD sysexits.h (64-78) ---
|
||||||
|
64) echo "Usage error (wrong arguments)" ;;
|
||||||
|
65) echo "Data format error (bad input data)" ;;
|
||||||
|
66) echo "Input file not found (cannot open input)" ;;
|
||||||
|
67) echo "User not found (addressee unknown)" ;;
|
||||||
|
68) echo "Host not found (hostname unknown)" ;;
|
||||||
|
69) echo "Service unavailable" ;;
|
||||||
|
70) echo "Internal software error" ;;
|
||||||
|
71) echo "System error (OS-level failure)" ;;
|
||||||
|
72) echo "Critical OS file missing" ;;
|
||||||
|
73) echo "Cannot create output file" ;;
|
||||||
|
74) echo "I/O error" ;;
|
||||||
|
76) echo "Remote protocol error" ;;
|
||||||
|
77) echo "Permission denied" ;;
|
||||||
|
|
||||||
# --- Common shell/system errors ---
|
# --- Common shell/system errors ---
|
||||||
124) echo "Command timed out (timeout command)" ;;
|
124) echo "Command timed out (timeout command)" ;;
|
||||||
126) echo "Command invoked cannot execute (permission problem?)" ;;
|
126) echo "Command invoked cannot execute (permission problem?)" ;;
|
||||||
@@ -624,6 +649,8 @@ EOF
|
|||||||
curl -fsS -m "${TELEMETRY_TIMEOUT}" -X POST "${TELEMETRY_URL}" \
|
curl -fsS -m "${TELEMETRY_TIMEOUT}" -X POST "${TELEMETRY_URL}" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d "$JSON_PAYLOAD" &>/dev/null || true
|
-d "$JSON_PAYLOAD" &>/dev/null || true
|
||||||
|
|
||||||
|
POST_TO_API_DONE=true
|
||||||
}
|
}
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -5253,14 +5253,20 @@ ensure_log_on_host() {
|
|||||||
# - Exit trap handler for reporting to API telemetry
|
# - Exit trap handler for reporting to API telemetry
|
||||||
# - Captures exit code and reports to PocketBase using centralized error descriptions
|
# - Captures exit code and reports to PocketBase using centralized error descriptions
|
||||||
# - Uses explain_exit_code() from api.func for consistent error messages
|
# - Uses explain_exit_code() from api.func for consistent error messages
|
||||||
# - Posts failure status with exit code to API (error description resolved automatically)
|
# - For non-zero exit codes: posts "failed" status
|
||||||
# - Only executes on non-zero exit codes
|
# - For zero exit codes where post_update_to_api was never called:
|
||||||
|
# catches orphaned "installing" records (e.g., script exited cleanly
|
||||||
|
# but description() was never reached)
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
api_exit_script() {
|
api_exit_script() {
|
||||||
exit_code=$?
|
local exit_code=$?
|
||||||
if [ $exit_code -ne 0 ]; then
|
if [ $exit_code -ne 0 ]; then
|
||||||
ensure_log_on_host
|
ensure_log_on_host
|
||||||
post_update_to_api "failed" "$exit_code"
|
post_update_to_api "failed" "$exit_code"
|
||||||
|
elif [[ "${POST_TO_API_DONE:-}" == "true" && "${POST_UPDATE_DONE:-}" != "true" ]]; then
|
||||||
|
# Script exited with 0 but never sent a completion status
|
||||||
|
# This catches edge cases like early returns after post_to_api()
|
||||||
|
post_update_to_api "failed" "1"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,11 +37,34 @@ if ! declare -f explain_exit_code &>/dev/null; then
|
|||||||
case "$code" in
|
case "$code" in
|
||||||
1) echo "General error / Operation not permitted" ;;
|
1) echo "General error / Operation not permitted" ;;
|
||||||
2) echo "Misuse of shell builtins (e.g. syntax error)" ;;
|
2) echo "Misuse of shell builtins (e.g. syntax error)" ;;
|
||||||
|
10) echo "Docker / privileged mode required (unsupported environment)" ;;
|
||||||
|
4) echo "curl: Feature not supported or protocol error" ;;
|
||||||
|
5) echo "curl: Could not resolve proxy" ;;
|
||||||
6) echo "curl: DNS resolution failed (could not resolve host)" ;;
|
6) echo "curl: DNS resolution failed (could not resolve host)" ;;
|
||||||
7) echo "curl: Failed to connect (network unreachable / host down)" ;;
|
7) echo "curl: Failed to connect (network unreachable / host down)" ;;
|
||||||
|
8) echo "curl: FTP server reply error" ;;
|
||||||
22) echo "curl: HTTP error returned (404, 429, 500+)" ;;
|
22) echo "curl: HTTP error returned (404, 429, 500+)" ;;
|
||||||
|
23) echo "curl: Write error (disk full or permissions)" ;;
|
||||||
|
25) echo "curl: Upload failed" ;;
|
||||||
28) echo "curl: Operation timeout (network slow or server not responding)" ;;
|
28) echo "curl: Operation timeout (network slow or server not responding)" ;;
|
||||||
|
30) echo "curl: FTP port command failed" ;;
|
||||||
35) echo "curl: SSL/TLS handshake failed (certificate error)" ;;
|
35) echo "curl: SSL/TLS handshake failed (certificate error)" ;;
|
||||||
|
56) echo "curl: Receive error (connection reset by peer)" ;;
|
||||||
|
75) echo "Temporary failure (retry later)" ;;
|
||||||
|
78) echo "curl: Remote file not found (404 on FTP/file)" ;;
|
||||||
|
64) echo "Usage error (wrong arguments)" ;;
|
||||||
|
65) echo "Data format error (bad input data)" ;;
|
||||||
|
66) echo "Input file not found (cannot open input)" ;;
|
||||||
|
67) echo "User not found (addressee unknown)" ;;
|
||||||
|
68) echo "Host not found (hostname unknown)" ;;
|
||||||
|
69) echo "Service unavailable" ;;
|
||||||
|
70) echo "Internal software error" ;;
|
||||||
|
71) echo "System error (OS-level failure)" ;;
|
||||||
|
72) echo "Critical OS file missing" ;;
|
||||||
|
73) echo "Cannot create output file" ;;
|
||||||
|
74) echo "I/O error" ;;
|
||||||
|
76) echo "Remote protocol error" ;;
|
||||||
|
77) echo "Permission denied" ;;
|
||||||
100) echo "APT: Package manager error (broken packages / dependency problems)" ;;
|
100) echo "APT: Package manager error (broken packages / dependency problems)" ;;
|
||||||
101) echo "APT: Configuration error (bad sources.list, malformed config)" ;;
|
101) echo "APT: Configuration error (bad sources.list, malformed config)" ;;
|
||||||
102) echo "APT: Lock held by another process (dpkg/apt still running)" ;;
|
102) echo "APT: Lock held by another process (dpkg/apt still running)" ;;
|
||||||
|
|||||||
@@ -529,9 +529,21 @@ cleanup_vmid() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cleanup() {
|
cleanup() {
|
||||||
|
local exit_code=$?
|
||||||
if [[ "$(dirs -p | wc -l)" -gt 1 ]]; then
|
if [[ "$(dirs -p | wc -l)" -gt 1 ]]; then
|
||||||
popd >/dev/null || true
|
popd >/dev/null || true
|
||||||
fi
|
fi
|
||||||
|
# Report final telemetry status if post_to_api_vm was called but no update was sent
|
||||||
|
if [[ "${POST_TO_API_DONE:-}" == "true" && "${POST_UPDATE_DONE:-}" != "true" ]]; then
|
||||||
|
if declare -f post_update_to_api >/dev/null 2>&1; then
|
||||||
|
if [[ $exit_code -ne 0 ]]; then
|
||||||
|
post_update_to_api "failed" "$exit_code"
|
||||||
|
else
|
||||||
|
# Exited cleanly but description()/success was never called — shouldn't happen
|
||||||
|
post_update_to_api "failed" "1"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
check_root() {
|
check_root() {
|
||||||
|
|||||||
@@ -100,8 +100,15 @@ function cleanup_vmid() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
|
local exit_code=$?
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
if [[ "${POST_TO_API_DONE:-}" == "true" && "${POST_UPDATE_DONE:-}" != "true" ]]; then
|
||||||
|
if [[ $exit_code -eq 0 ]]; then
|
||||||
post_update_to_api "done" "none"
|
post_update_to_api "done" "none"
|
||||||
|
else
|
||||||
|
post_update_to_api "failed" "$exit_code"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
rm -rf $TEMP_DIR
|
rm -rf $TEMP_DIR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -100,8 +100,15 @@ function cleanup_vmid() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
|
local exit_code=$?
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
if [[ "${POST_TO_API_DONE:-}" == "true" && "${POST_UPDATE_DONE:-}" != "true" ]]; then
|
||||||
|
if [[ $exit_code -eq 0 ]]; then
|
||||||
post_update_to_api "done" "none"
|
post_update_to_api "done" "none"
|
||||||
|
else
|
||||||
|
post_update_to_api "failed" "$exit_code"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
rm -rf $TEMP_DIR
|
rm -rf $TEMP_DIR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -100,8 +100,15 @@ function cleanup_vmid() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
|
local exit_code=$?
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
if [[ "${POST_TO_API_DONE:-}" == "true" && "${POST_UPDATE_DONE:-}" != "true" ]]; then
|
||||||
|
if [[ $exit_code -eq 0 ]]; then
|
||||||
post_update_to_api "done" "none"
|
post_update_to_api "done" "none"
|
||||||
|
else
|
||||||
|
post_update_to_api "failed" "$exit_code"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
rm -rf $TEMP_DIR
|
rm -rf $TEMP_DIR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -104,8 +104,16 @@ function cleanup_vmid() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
|
local exit_code=$?
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
# Only send telemetry if post_to_api_vm was called (installing status was sent)
|
||||||
|
if [[ "${POST_TO_API_DONE:-}" == "true" && "${POST_UPDATE_DONE:-}" != "true" ]]; then
|
||||||
|
if [[ $exit_code -eq 0 ]]; then
|
||||||
post_update_to_api "done" "none"
|
post_update_to_api "done" "none"
|
||||||
|
else
|
||||||
|
post_update_to_api "failed" "$exit_code"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
rm -rf $TEMP_DIR
|
rm -rf $TEMP_DIR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -101,8 +101,15 @@ function cleanup_vmid() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
|
local exit_code=$?
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
if [[ "${POST_TO_API_DONE:-}" == "true" && "${POST_UPDATE_DONE:-}" != "true" ]]; then
|
||||||
|
if [[ $exit_code -eq 0 ]]; then
|
||||||
post_update_to_api "done" "none"
|
post_update_to_api "done" "none"
|
||||||
|
else
|
||||||
|
post_update_to_api "failed" "$exit_code"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
rm -rf $TEMP_DIR
|
rm -rf $TEMP_DIR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -100,8 +100,15 @@ function cleanup_vmid() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
|
local exit_code=$?
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
if [[ "${POST_TO_API_DONE:-}" == "true" && "${POST_UPDATE_DONE:-}" != "true" ]]; then
|
||||||
|
if [[ $exit_code -eq 0 ]]; then
|
||||||
post_update_to_api "done" "none"
|
post_update_to_api "done" "none"
|
||||||
|
else
|
||||||
|
post_update_to_api "failed" "$exit_code"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
rm -rf $TEMP_DIR
|
rm -rf $TEMP_DIR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,15 @@ function cleanup_vmid() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
|
local exit_code=$?
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
if [[ "${POST_TO_API_DONE:-}" == "true" && "${POST_UPDATE_DONE:-}" != "true" ]]; then
|
||||||
|
if [[ $exit_code -eq 0 ]]; then
|
||||||
|
post_update_to_api "done" "none"
|
||||||
|
else
|
||||||
|
post_update_to_api "failed" "$exit_code"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
rm -rf $TEMP_DIR
|
rm -rf $TEMP_DIR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,8 +79,15 @@ function cleanup_vmid() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
|
local exit_code=$?
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
if [[ "${POST_TO_API_DONE:-}" == "true" && "${POST_UPDATE_DONE:-}" != "true" ]]; then
|
||||||
|
if [[ $exit_code -eq 0 ]]; then
|
||||||
post_update_to_api "done" "none"
|
post_update_to_api "done" "none"
|
||||||
|
else
|
||||||
|
post_update_to_api "failed" "$exit_code"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
rm -rf $TEMP_DIR
|
rm -rf $TEMP_DIR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -101,8 +101,15 @@ function cleanup_vmid() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
|
local exit_code=$?
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
if [[ "${POST_TO_API_DONE:-}" == "true" && "${POST_UPDATE_DONE:-}" != "true" ]]; then
|
||||||
|
if [[ $exit_code -eq 0 ]]; then
|
||||||
post_update_to_api "done" "none"
|
post_update_to_api "done" "none"
|
||||||
|
else
|
||||||
|
post_update_to_api "failed" "$exit_code"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
rm -rf $TEMP_DIR
|
rm -rf $TEMP_DIR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -109,8 +109,15 @@ function cleanup_vmid() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
|
local exit_code=$?
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
if [[ "${POST_TO_API_DONE:-}" == "true" && "${POST_UPDATE_DONE:-}" != "true" ]]; then
|
||||||
|
if [[ $exit_code -eq 0 ]]; then
|
||||||
post_update_to_api "done" "none"
|
post_update_to_api "done" "none"
|
||||||
|
else
|
||||||
|
post_update_to_api "failed" "$exit_code"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
rm -rf $TEMP_DIR
|
rm -rf $TEMP_DIR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,15 @@ function cleanup_vmid() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
|
local exit_code=$?
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
if [[ "${POST_TO_API_DONE:-}" == "true" && "${POST_UPDATE_DONE:-}" != "true" ]]; then
|
||||||
|
if [[ $exit_code -eq 0 ]]; then
|
||||||
|
post_update_to_api "done" "none"
|
||||||
|
else
|
||||||
|
post_update_to_api "failed" "$exit_code"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
rm -rf $TEMP_DIR
|
rm -rf $TEMP_DIR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -100,7 +100,15 @@ function cleanup_vmid() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
|
local exit_code=$?
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
if [[ "${POST_TO_API_DONE:-}" == "true" && "${POST_UPDATE_DONE:-}" != "true" ]]; then
|
||||||
|
if [[ $exit_code -eq 0 ]]; then
|
||||||
|
post_update_to_api "done" "none"
|
||||||
|
else
|
||||||
|
post_update_to_api "failed" "$exit_code"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
rm -rf $TEMP_DIR
|
rm -rf $TEMP_DIR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -99,7 +99,15 @@ function cleanup_vmid() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
|
local exit_code=$?
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
if [[ "${POST_TO_API_DONE:-}" == "true" && "${POST_UPDATE_DONE:-}" != "true" ]]; then
|
||||||
|
if [[ $exit_code -eq 0 ]]; then
|
||||||
|
post_update_to_api "done" "none"
|
||||||
|
else
|
||||||
|
post_update_to_api "failed" "$exit_code"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
rm -rf $TEMP_DIR
|
rm -rf $TEMP_DIR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -99,8 +99,15 @@ function cleanup_vmid() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
|
local exit_code=$?
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
|
if [[ "${POST_TO_API_DONE:-}" == "true" && "${POST_UPDATE_DONE:-}" != "true" ]]; then
|
||||||
|
if [[ $exit_code -eq 0 ]]; then
|
||||||
post_update_to_api "done" "none"
|
post_update_to_api "done" "none"
|
||||||
|
else
|
||||||
|
post_update_to_api "failed" "$exit_code"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
rm -rf $TEMP_DIR
|
rm -rf $TEMP_DIR
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user