Ver Fonte

Merge pull request #134 from harrysudana/fix-interrupted-dpkg

interrupted installation
Andrea Pollastri há 5 anos atrás
pai
commit
cf1b73dc2d
3 ficheiros alterados com 18 adições e 19 exclusões
  1. 6 7
      setup/18.sh
  2. 6 6
      setup/20.sh
  3. 6 6
      storage/app/scripts/install.sh

+ 6 - 7
setup/18.sh

@@ -66,13 +66,6 @@ sleep 3s
 sudo apt-get update
 sudo apt-get -y install rpl zip unzip curl dirmngr apt-transport-https lsb-release ca-certificates dnsutils htop
 
-
-sudo rpl -i -w "#PasswordAuthentication" "PasswordAuthentication" /etc/ssh/sshd_config
-sudo rpl -i -w "# PasswordAuthentication" "PasswordAuthentication" /etc/ssh/sshd_config
-sudo rpl -i -w "PasswordAuthentication no" "PasswordAuthentication yes" /etc/ssh/sshd_config
-sudo rpl -i -w "PermitRootLogin yes" "PermitRootLogin no" /etc/ssh/sshd_config
-sudo service sshd restart
-
 WELCOME=/etc/motd
 sudo touch $WELCOME
 sudo cat > "$WELCOME" <<EOF
@@ -392,6 +385,12 @@ crontab $TASK
 
 sudo systemctl restart nginx.service
 
+sudo rpl -i -w "#PasswordAuthentication" "PasswordAuthentication" /etc/ssh/sshd_config
+sudo rpl -i -w "# PasswordAuthentication" "PasswordAuthentication" /etc/ssh/sshd_config
+sudo rpl -i -w "PasswordAuthentication no" "PasswordAuthentication yes" /etc/ssh/sshd_config
+sudo rpl -i -w "PermitRootLogin yes" "PermitRootLogin no" /etc/ssh/sshd_config
+sudo service sshd restart
+
 clear
 echo "Cipi installation has been completed... Wait for your data!"
 sleep 3s

+ 6 - 6
setup/20.sh

@@ -67,12 +67,6 @@ sudo apt-get update
 export DEBIAN_FRONTEND=noninteractive
 sudo apt-get -y install rpl zip unzip openssl curl expect dirmngr apt-transport-https lsb-release ca-certificates dnsutils htop
 
-sudo rpl -i -w "#PasswordAuthentication" "PasswordAuthentication" /etc/ssh/sshd_config
-sudo rpl -i -w "# PasswordAuthentication" "PasswordAuthentication" /etc/ssh/sshd_config
-sudo rpl -i -w "PasswordAuthentication no" "PasswordAuthentication yes" /etc/ssh/sshd_config
-sudo rpl -i -w "PermitRootLogin yes" "PermitRootLogin no" /etc/ssh/sshd_config
-sudo service sshd restart
-
 WELCOME=/etc/motd
 sudo touch $WELCOME
 sudo cat > "$WELCOME" <<EOF
@@ -416,6 +410,12 @@ crontab $TASK
 
 sudo systemctl restart nginx.service
 
+sudo rpl -i -w "#PasswordAuthentication" "PasswordAuthentication" /etc/ssh/sshd_config
+sudo rpl -i -w "# PasswordAuthentication" "PasswordAuthentication" /etc/ssh/sshd_config
+sudo rpl -i -w "PasswordAuthentication no" "PasswordAuthentication yes" /etc/ssh/sshd_config
+sudo rpl -i -w "PermitRootLogin yes" "PermitRootLogin no" /etc/ssh/sshd_config
+sudo service sshd restart
+
 clear
 echo "Cipi installation has been completed... Wait for your data!"
 sleep 3s

+ 6 - 6
storage/app/scripts/install.sh

@@ -110,12 +110,6 @@ sleep 3s
 sudo apt-get update
 sudo apt-get -y install nano rpl sed zip unzip openssl expect dirmngr apt-transport-https lsb-release ca-certificates dnsutils dos2unix zsh htop
 
-sudo rpl -i -w "#PasswordAuthentication" "PasswordAuthentication" /etc/ssh/sshd_config
-sudo rpl -i -w "# PasswordAuthentication" "PasswordAuthentication" /etc/ssh/sshd_config
-sudo rpl -i -w "PasswordAuthentication no" "PasswordAuthentication yes" /etc/ssh/sshd_config
-sudo rpl -i -w "PermitRootLogin yes" "PermitRootLogin no" /etc/ssh/sshd_config
-sudo service sshd restart
-
 WELCOME=/etc/motd
 sudo touch $WELCOME
 sudo cat > "$WELCOME" <<EOF
@@ -801,6 +795,12 @@ crontab $TASK
 
 sudo systemctl restart nginx.service
 
+sudo rpl -i -w "#PasswordAuthentication" "PasswordAuthentication" /etc/ssh/sshd_config
+sudo rpl -i -w "# PasswordAuthentication" "PasswordAuthentication" /etc/ssh/sshd_config
+sudo rpl -i -w "PasswordAuthentication no" "PasswordAuthentication yes" /etc/ssh/sshd_config
+sudo rpl -i -w "PermitRootLogin yes" "PermitRootLogin no" /etc/ssh/sshd_config
+sudo service sshd restart
+
 curl --request GET --url $REMOTE/remote/finalize/$SERVERCODE
 
 clear