mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-11-17 19:16:25 +00:00
fix: use MONITOR_SERVICE constant instead of MONITOR_SERVICE_NAME in uninstall function
This commit is contained in:
@@ -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."
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user