feat: add new checks for debian12

systemd_timesyncd_is_enabled_and_running.sh	-> 2.3.2.2
rpcbind_is_disabled.sh				-> 2.1.12
ftp_client_not_installed.sh			-> 2.2.6
chrony_with_chrony_user.sh			-> 2.3.3.2
ipv6_is_enabled.sh				-> 3.1.1
This commit is contained in:
damien cavagnini
2025-07-23 10:09:28 +02:00
parent eda302d55f
commit a7bc6a47f9
19 changed files with 562 additions and 15 deletions

View File

@@ -326,6 +326,27 @@ is_service_enabled() {
fi
}
is_socket_enabled() {
local SOCKET=$1
# if running in a container, it does not make much sense to test for systemd / service
# the var "IS_CONTAINER" defined in lib/constant may not be enough, in case we are using systemd slices
# currently, did not find a unified way to manage all cases, so we check this only for systemctl usage
is_using_sbin_init
if [ "$FNRET" -eq 1 ]; then
debug "host was not started using '/sbin/init', systemd should not be available"
FNRET=1
return
fi
if $SUDO_CMD systemctl -t socket is-enabled "$SOCKET" >/dev/null; then
debug "Socket $SOCKET is enabled"
FNRET=0
else
debug "Socket $SOCKET is disabled"
FNRET=1
fi
}
#
# Kernel Options checks
#