V8.13.288.2025.10.24
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m46s

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-10-24 13:55:53 +01:00
parent 4a679a222f
commit 02425e4b31

View File

@@ -197,7 +197,7 @@ hardening_ultra() {
### /config/includes.chroot/etc/ssh/sshd_config ### /config/includes.chroot/etc/ssh/sshd_config
# shellcheck disable=SC2155 # shellcheck disable=SC2155
declare pad="$(printf '%-29s' 'Port')" declare pad="$(printf '%-29s' 'Port')"
sed -E -i "s|^[[:space:]]*#?[[:space:]]*(Port[[:space:]]+PORT_MUST_BE_CHANGED)[[:space:]]*$|${pad}${sshport}|" "${VAR_HANDLER_BUILD_DIR}/config/includes.chroot/etc/ssh/sshd_config" sed -i -E "/PORT_MUST_BE_CHANGED/ s|.*|${pad}${sshport}|" "${VAR_HANDLER_BUILD_DIR}/config/includes.chroot/etc/ssh/sshd_config"
### /config/hooks/live/9950_fail2ban_hardening.chroot ### /config/hooks/live/9950_fail2ban_hardening.chroot
sed -i "s|PORT_MUST_BE_SET|${sshport}|g" "${VAR_HANDLER_BUILD_DIR}/config/hooks/live/9950_fail2ban_hardening.chroot" sed -i "s|PORT_MUST_BE_SET|${sshport}|g" "${VAR_HANDLER_BUILD_DIR}/config/hooks/live/9950_fail2ban_hardening.chroot"
@@ -246,7 +246,7 @@ hardening_ultra() {
### /config/includes.chroot/etc/ssh/sshd_config ### /config/includes.chroot/etc/ssh/sshd_config
# shellcheck disable=SC2155 # shellcheck disable=SC2155
declare pad="$(printf '%-29s' 'Port')" declare pad="$(printf '%-29s' 'Port')"
sed -E -i "s|^[[:space:]]*#?[[:space:]]*(Port[[:space:]]+PORT_MUST_BE_CHANGED)[[:space:]]*$|${pad}${sshport}|" "${VAR_HANDLER_BUILD_DIR}/config/includes.chroot/etc/ssh/sshd_config" sed -i -E "/PORT_MUST_BE_CHANGED/ s|.*|${pad}${sshport}|" "${VAR_HANDLER_BUILD_DIR}/config/includes.chroot/etc/ssh/sshd_config"
### /config/hooks/live/9950_fail2ban_hardening.chroot ### /config/hooks/live/9950_fail2ban_hardening.chroot
sed -i "s|PORT_MUST_BE_SET|${sshport}|g" "${VAR_HANDLER_BUILD_DIR}/config/hooks/live/9950_fail2ban_hardening.chroot" sed -i "s|PORT_MUST_BE_SET|${sshport}|g" "${VAR_HANDLER_BUILD_DIR}/config/hooks/live/9950_fail2ban_hardening.chroot"