fix: use MONITOR_SERVICE constant instead of MONITOR_SERVICE_NAME in uninstall function

This commit is contained in:
cod378
2025-11-14 02:30:19 +00:00
parent ba595c9719
commit 2e8e2b61d3

View File

@@ -36,17 +36,17 @@ initialize_cache
uninstall_proxmenux_monitor() { uninstall_proxmenux_monitor() {
# 1. Stop service if it is running # 1. Stop service if it is running
if systemctl is-active --quiet "${MONITOR_SERVICE_NAME}"; then if systemctl is-active --quiet "${MONITOR_SERVICE}"; then
echo " - Stoping service..." echo " - Stoping service..."
systemctl stop "${MONITOR_SERVICE_NAME}" systemctl stop "${MONITOR_SERVICE}"
else else
echo " - Service is not running (ok)" echo " - Service is not running (ok)"
fi fi
# 2. Disable service if enabled # 2. Disable service if enabled
if systemctl is-enabled --quiet "${MONITOR_SERVICE_NAME}"; then if systemctl is-enabled --quiet "${MONITOR_SERVICE}"; then
echo " - Disabling service..." echo " - Disabling service..."
systemctl disable "${MONITOR_SERVICE_NAME}" systemctl disable "${MONITOR_SERVICE}"
else else
echo " - Service is not enabled (ok)" echo " - Service is not enabled (ok)"
fi fi
@@ -64,7 +64,7 @@ uninstall_proxmenux_monitor() {
systemctl daemon-reload systemctl daemon-reload
systemctl reset-failed || true systemctl reset-failed || true
echo "==> Service ${MONITOR_SERVICE_NAME} uninstalled." echo "==> Service ${MONITOR_SERVICE} uninstalled."
} }