code refactoring (#845)

This commit is contained in:
tteckster 2022-12-19 11:08:29 -05:00 committed by GitHub
parent 9507f9df5c
commit 13ac5e607f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
58 changed files with 116 additions and 232 deletions

View File

@ -107,10 +107,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -363,10 +363,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -116,10 +116,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -122,10 +122,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -109,10 +109,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -140,10 +140,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -101,10 +101,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -133,10 +133,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -159,10 +159,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -122,10 +122,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -107,10 +107,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -129,10 +129,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -116,10 +116,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
systemctl start grafana-server
systemctl enable grafana-server.service &>/dev/null

View File

@ -145,10 +145,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -140,10 +140,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -185,10 +185,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -343,10 +343,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -119,10 +119,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -137,10 +137,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -140,10 +140,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -107,10 +107,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -147,10 +147,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -128,10 +128,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -224,10 +224,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -124,10 +124,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -118,10 +118,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -137,10 +137,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -114,10 +114,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -130,10 +130,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -156,10 +156,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -105,10 +105,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -262,10 +262,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Starting Services"

View File

@ -136,10 +136,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -138,10 +138,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -112,10 +112,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -124,10 +124,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -124,10 +124,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -197,10 +197,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -127,10 +127,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -126,10 +126,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -160,10 +160,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -231,10 +231,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -136,10 +136,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -195,10 +195,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -165,10 +165,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -110,10 +110,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -107,10 +107,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -131,10 +131,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -102,10 +102,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -117,10 +117,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"
apt-get autoremove >/dev/null

View File

@ -115,10 +115,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -136,10 +136,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -192,10 +192,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -124,10 +124,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -152,10 +152,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -166,10 +166,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -152,10 +152,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"

View File

@ -128,10 +128,8 @@ EOF
msg_ok "Customized Container"
fi
if [[ "${SSH_ROOT}" == "yes" ]]; then
cat <<EOF >>/etc/ssh/sshd_config
PermitRootLogin yes
EOF
systemctl restart sshd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config
systemctl restart sshd
fi
msg_info "Cleaning up"