mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-11-18 03:26:17 +00:00
fix: suppress systemctl output in ProxMenux Monitor uninstaller
- Redirect stdout and stderr to /dev/null for stop, disable, daemon-reload, and reset-failed commands - Maintain clean console output during uninstallation process
This commit is contained in:
@@ -38,7 +38,7 @@ uninstall_proxmenux_monitor() {
|
|||||||
# 1. Stop service if it is running
|
# 1. Stop service if it is running
|
||||||
if systemctl is-active --quiet "${MONITOR_SERVICE}"; then
|
if systemctl is-active --quiet "${MONITOR_SERVICE}"; then
|
||||||
echo " - Stoping service..."
|
echo " - Stoping service..."
|
||||||
systemctl stop "${MONITOR_SERVICE}"
|
systemctl stop "${MONITOR_SERVICE}" > /dev/null 2>&1
|
||||||
else
|
else
|
||||||
echo " - Service is not running (ok)"
|
echo " - Service is not running (ok)"
|
||||||
fi
|
fi
|
||||||
@@ -46,7 +46,7 @@ uninstall_proxmenux_monitor() {
|
|||||||
# 2. Disable service if enabled
|
# 2. Disable service if enabled
|
||||||
if systemctl is-enabled --quiet "${MONITOR_SERVICE}"; then
|
if systemctl is-enabled --quiet "${MONITOR_SERVICE}"; then
|
||||||
echo " - Disabling service..."
|
echo " - Disabling service..."
|
||||||
systemctl disable "${MONITOR_SERVICE}"
|
systemctl disable "${MONITOR_SERVICE}" > /dev/null 2>&1
|
||||||
else
|
else
|
||||||
echo " - Service is not enabled (ok)"
|
echo " - Service is not enabled (ok)"
|
||||||
fi
|
fi
|
||||||
@@ -61,8 +61,8 @@ uninstall_proxmenux_monitor() {
|
|||||||
|
|
||||||
# 4. Reload systemd
|
# 4. Reload systemd
|
||||||
echo " - Recargando systemd..."
|
echo " - Recargando systemd..."
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload > /dev/null 2>&1
|
||||||
systemctl reset-failed || true
|
systemctl reset-failed > /dev/null 2>&1 || true
|
||||||
|
|
||||||
echo "==> Service ${MONITOR_SERVICE} uninstalled."
|
echo "==> Service ${MONITOR_SERVICE} uninstalled."
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user