Selaa lähdekoodia

code refactoring (#845)

tteckster 2 vuotta sitten
vanhempi
commit
13ac5e607f
58 muutettua tiedostoa jossa 116 lisäystä ja 232 poistoa
  1. 2 4
      setup/adguard-install.sh
  2. 2 4
      setup/blocky-install.sh
  3. 2 4
      setup/casaos-install.sh
  4. 2 4
      setup/changedetection-install.sh
  5. 2 4
      setup/daemonsync-install.sh
  6. 2 4
      setup/dashy-install.sh
  7. 2 4
      setup/debian-install.sh
  8. 2 4
      setup/deconz-install.sh
  9. 2 4
      setup/docker-install.sh
  10. 2 4
      setup/emby-install.sh
  11. 2 4
      setup/emqx-install.sh
  12. 2 4
      setup/esphome-install.sh
  13. 2 4
      setup/grafana-install.sh
  14. 2 4
      setup/grocy-install.sh
  15. 2 4
      setup/heimdalldashboard-install.sh
  16. 2 4
      setup/homeassistant-core-install.sh
  17. 2 4
      setup/homeassistant-install.sh
  18. 2 4
      setup/homebridge-install.sh
  19. 2 4
      setup/homepage-install.sh
  20. 2 4
      setup/influxdb-install.sh
  21. 2 4
      setup/iobroker-install.sh
  22. 2 4
      setup/jellyfin-install.sh
  23. 2 4
      setup/keycloak-install.sh
  24. 2 4
      setup/magicmirror-install.sh
  25. 2 4
      setup/mariadb-install.sh
  26. 2 4
      setup/meshcentral-install.sh
  27. 2 4
      setup/motioneye-install.sh
  28. 2 4
      setup/mqtt-install.sh
  29. 2 4
      setup/n8n-install.sh
  30. 2 4
      setup/navidrome-install.sh
  31. 2 4
      setup/nextcloudpi-install.sh
  32. 2 4
      setup/nginx-proxy-manager-install.sh
  33. 2 4
      setup/nocodb-install.sh
  34. 2 4
      setup/node-red-install.sh
  35. 2 4
      setup/omada-install.sh
  36. 2 4
      setup/omv-install.sh
  37. 2 4
      setup/openhab-install.sh
  38. 2 4
      setup/photoprism-install.sh
  39. 2 4
      setup/pihole-install.sh
  40. 2 4
      setup/plex-install.sh
  41. 2 4
      setup/podman-homeassistant-install.sh
  42. 2 4
      setup/postgresql-install.sh
  43. 2 4
      setup/prometheus-install.sh
  44. 2 4
      setup/scrypted-install.sh
  45. 2 4
      setup/shinobi-install.sh
  46. 2 4
      setup/syncthing-install.sh
  47. 2 4
      setup/technitiumdns-install.sh
  48. 2 4
      setup/trilium-install.sh
  49. 2 4
      setup/ubuntu-install.sh
  50. 2 4
      setup/umbrel-install.sh
  51. 2 4
      setup/unifi-install.sh
  52. 2 4
      setup/uptimekuma-install.sh
  53. 2 4
      setup/vaultwarden-install.sh
  54. 2 4
      setup/whoogle-install.sh
  55. 2 4
      setup/wikijs-install.sh
  56. 2 4
      setup/wireguard-install.sh
  57. 2 4
      setup/zigbee2mqtt-install.sh
  58. 2 4
      setup/zwave-js-ui-install.sh

+ 2 - 4
setup/adguard-install.sh

@@ -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"

+ 2 - 4
setup/blocky-install.sh

@@ -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"

+ 2 - 4
setup/casaos-install.sh

@@ -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"

+ 2 - 4
setup/changedetection-install.sh

@@ -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"

+ 2 - 4
setup/daemonsync-install.sh

@@ -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"

+ 2 - 4
setup/dashy-install.sh

@@ -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"

+ 2 - 4
setup/debian-install.sh

@@ -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"

+ 2 - 4
setup/deconz-install.sh

@@ -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"

+ 2 - 4
setup/docker-install.sh

@@ -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"

+ 2 - 4
setup/emby-install.sh

@@ -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"

+ 2 - 4
setup/emqx-install.sh

@@ -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"

+ 2 - 4
setup/esphome-install.sh

@@ -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"

+ 2 - 4
setup/grafana-install.sh

@@ -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

+ 2 - 4
setup/grocy-install.sh

@@ -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"

+ 2 - 4
setup/heimdalldashboard-install.sh

@@ -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"

+ 2 - 4
setup/homeassistant-core-install.sh

@@ -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"

+ 2 - 4
setup/homeassistant-install.sh

@@ -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"

+ 2 - 4
setup/homebridge-install.sh

@@ -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"

+ 2 - 4
setup/homepage-install.sh

@@ -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"

+ 2 - 4
setup/influxdb-install.sh

@@ -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"

+ 2 - 4
setup/iobroker-install.sh

@@ -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"

+ 2 - 4
setup/jellyfin-install.sh

@@ -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"

+ 2 - 4
setup/keycloak-install.sh

@@ -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"

+ 2 - 4
setup/magicmirror-install.sh

@@ -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"

+ 2 - 4
setup/mariadb-install.sh

@@ -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"

+ 2 - 4
setup/meshcentral-install.sh

@@ -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"

+ 2 - 4
setup/motioneye-install.sh

@@ -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"

+ 2 - 4
setup/mqtt-install.sh

@@ -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"

+ 2 - 4
setup/n8n-install.sh

@@ -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"

+ 2 - 4
setup/navidrome-install.sh

@@ -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"

+ 2 - 4
setup/nextcloudpi-install.sh

@@ -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"

+ 2 - 4
setup/nginx-proxy-manager-install.sh

@@ -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"

+ 2 - 4
setup/nocodb-install.sh

@@ -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"

+ 2 - 4
setup/node-red-install.sh

@@ -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"

+ 2 - 4
setup/omada-install.sh

@@ -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"

+ 2 - 4
setup/omv-install.sh

@@ -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"

+ 2 - 4
setup/openhab-install.sh

@@ -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"

+ 2 - 4
setup/photoprism-install.sh

@@ -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"

+ 2 - 4
setup/pihole-install.sh

@@ -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"

+ 2 - 4
setup/plex-install.sh

@@ -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"

+ 2 - 4
setup/podman-homeassistant-install.sh

@@ -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"

+ 2 - 4
setup/postgresql-install.sh

@@ -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"

+ 2 - 4
setup/prometheus-install.sh

@@ -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"

+ 2 - 4
setup/scrypted-install.sh

@@ -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"

+ 2 - 4
setup/shinobi-install.sh

@@ -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"

+ 2 - 4
setup/syncthing-install.sh

@@ -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"

+ 2 - 4
setup/technitiumdns-install.sh

@@ -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"

+ 2 - 4
setup/trilium-install.sh

@@ -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"

+ 2 - 4
setup/ubuntu-install.sh

@@ -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"

+ 2 - 4
setup/umbrel-install.sh

@@ -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

+ 2 - 4
setup/unifi-install.sh

@@ -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"

+ 2 - 4
setup/uptimekuma-install.sh

@@ -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"

+ 2 - 4
setup/vaultwarden-install.sh

@@ -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"

+ 2 - 4
setup/whoogle-install.sh

@@ -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"

+ 2 - 4
setup/wikijs-install.sh

@@ -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"

+ 2 - 4
setup/wireguard-install.sh

@@ -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"

+ 2 - 4
setup/zigbee2mqtt-install.sh

@@ -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"

+ 2 - 4
setup/zwave-js-ui-install.sh

@@ -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"