mirror of https://github.com/tteck/Proxmox.git
parent
606634b25a
commit
f0a8502c96
|
@ -83,6 +83,7 @@ setting_up_container() {
|
||||||
echo -e " 🖧 Check Network Settings"
|
echo -e " 🖧 Check Network Settings"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||||
msg_ok "Set up Container OS"
|
msg_ok "Set up Container OS"
|
||||||
msg_ok "Network Connected: ${BL}$(hostname -I)"
|
msg_ok "Network Connected: ${BL}$(hostname -I)"
|
||||||
}
|
}
|
||||||
|
@ -132,16 +133,16 @@ motd_ssh() {
|
||||||
# This function customizes the container by modifying the getty service and enabling auto-login for the root user
|
# This function customizes the container by modifying the getty service and enabling auto-login for the root user
|
||||||
customize() {
|
customize() {
|
||||||
if [[ "$PASSWORD" == "" ]]; then
|
if [[ "$PASSWORD" == "" ]]; then
|
||||||
msg_info "Customizing Container"
|
msg_info "Customizing Container"
|
||||||
GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf"
|
GETTY_OVERRIDE="/etc/systemd/system/container-getty@1.service.d/override.conf"
|
||||||
mkdir -p $(dirname $GETTY_OVERRIDE)
|
mkdir -p $(dirname $GETTY_OVERRIDE)
|
||||||
cat <<EOF >$GETTY_OVERRIDE
|
cat <<EOF >$GETTY_OVERRIDE
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=
|
ExecStart=
|
||||||
ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM
|
ExecStart=-/sbin/agetty --autologin root --noclear --keep-baud tty%I 115200,38400,9600 \$TERM
|
||||||
EOF
|
EOF
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//')
|
systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//')
|
||||||
msg_ok "Customized Container"
|
msg_ok "Customized Container"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue