Update install.func

This commit is contained in:
CanbiZ 2025-11-24 10:28:56 +01:00
parent 532fa094f3
commit 3a4d938fac

View File

@ -270,14 +270,15 @@ motd_ssh() {
# - Sets proper permissions on SSH directories and key files
# ------------------------------------------------------------------------------
customize() {
if [[ "$PASSWORD" == "" ]]; then
msg_info "Customizing Container"
if [[ -z "${PASSWORD:-}" ]]; then
msg_info "Configuring autologin for root"
passwd -d root >/dev/null 2>&1 || true
GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf"
mkdir -p $(dirname $GETTY_OVERRIDE)
cat <<EOF >$GETTY_OVERRIDE
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM
mkdir -p "$(dirname "$GETTY_OVERRIDE")"
cat <<EOF >"$GETTY_OVERRIDE"
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM
EOF
$STD systemctl daemon-reload || true
msg_ok "Customized Container"