Browse Source

Since hrng enable and ssh host key generation is done with the image builder we no longer need the reboot

Bob Mottram 9 years ago
parent
commit
ca417ad491
1 changed files with 17 additions and 17 deletions
  1. 17
    17
      src/freedombone

+ 17
- 17
src/freedombone View File

3768
   echo "  if [ -d /etc/letsencrypt/live/${FULLBLOG_DOMAIN_NAME} ]; then" >> /usr/bin/$RESTORE_SCRIPT_NAME
3768
   echo "  if [ -d /etc/letsencrypt/live/${FULLBLOG_DOMAIN_NAME} ]; then" >> /usr/bin/$RESTORE_SCRIPT_NAME
3769
   echo "      ln -s /etc/letsencrypt/live/${FULLBLOG_DOMAIN_NAME}/privkey.pem /etc/ssl/private/${FULLBLOG_DOMAIN_NAME}.key" >> /usr/bin/$RESTORE_SCRIPT_NAME
3769
   echo "      ln -s /etc/letsencrypt/live/${FULLBLOG_DOMAIN_NAME}/privkey.pem /etc/ssl/private/${FULLBLOG_DOMAIN_NAME}.key" >> /usr/bin/$RESTORE_SCRIPT_NAME
3770
   echo "      ln -s /etc/letsencrypt/live/${FULLBLOG_DOMAIN_NAME}/fullchain.pem /etc/ssl/certs/${FULLBLOG_DOMAIN_NAME}.pem" >> /usr/bin/$RESTORE_SCRIPT_NAME
3770
   echo "      ln -s /etc/letsencrypt/live/${FULLBLOG_DOMAIN_NAME}/fullchain.pem /etc/ssl/certs/${FULLBLOG_DOMAIN_NAME}.pem" >> /usr/bin/$RESTORE_SCRIPT_NAME
3771
-  echo '  fi' >> /usr/bin/$RESTORE_SCRIPT_NAME  
3771
+  echo '  fi' >> /usr/bin/$RESTORE_SCRIPT_NAME
3772
   echo 'fi' >> /usr/bin/$RESTORE_SCRIPT_NAME
3772
   echo 'fi' >> /usr/bin/$RESTORE_SCRIPT_NAME
3773
   echo '' >> /usr/bin/$RESTORE_SCRIPT_NAME
3773
   echo '' >> /usr/bin/$RESTORE_SCRIPT_NAME
3774
 
3774
 
4854
   echo '          if [ -d /etc/letsencrypt/live/${2} ]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME
4854
   echo '          if [ -d /etc/letsencrypt/live/${2} ]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME
4855
   echo '              ln -s /etc/letsencrypt/live/${2}/privkey.pem /etc/ssl/private/${2}.key' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME
4855
   echo '              ln -s /etc/letsencrypt/live/${2}/privkey.pem /etc/ssl/private/${2}.key' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME
4856
   echo '              ln -s /etc/letsencrypt/live/${2}/fullchain.pem /etc/ssl/certs/${2}.pem' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME
4856
   echo '              ln -s /etc/letsencrypt/live/${2}/fullchain.pem /etc/ssl/certs/${2}.pem' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME
4857
-  echo '          else' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME  
4857
+  echo '          else' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME
4858
   echo '              # Ensure that the bundled SSL cert is being used' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME
4858
   echo '              # Ensure that the bundled SSL cert is being used' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME
4859
   echo '              if [ -f /etc/ssl/certs/${2}.bundle.crt ]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME
4859
   echo '              if [ -f /etc/ssl/certs/${2}.bundle.crt ]; then' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME
4860
   echo '                  sed -i "s|${2}.crt|${2}.bundle.crt|g" /etc/nginx/sites-available/${2}' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME
4860
   echo '                  sed -i "s|${2}.crt|${2}.bundle.crt|g" /etc/nginx/sites-available/${2}' >> /usr/bin/$RESTORE_FROM_FRIEND_SCRIPT_NAME
6164
   if [[ $INSTALLED_WITHIN_DOCKER == "yes" || $INSTALLING_ON_BBB != "yes" ]]; then
6164
   if [[ $INSTALLED_WITHIN_DOCKER == "yes" || $INSTALLING_ON_BBB != "yes" ]]; then
6165
       return
6165
       return
6166
   fi
6166
   fi
6167
-  echo ''
6168
-  echo ''
6169
-  echo '  *** Rebooting to initialise ssh settings and random number generator ***'
6170
-  echo ''
6171
-  echo "  *** Reconnect via ssh on port $SSH_PORT, then run this script again  ***"
6172
-  echo ''
6173
-  echo '## ' >> /etc/motd
6174
-  echo '## Type "su" and enter your administrator password, then use the command:' >> /etc/motd
6175
-  echo '## ' >> /etc/motd
6176
-  echo '##   freedombone -c freedombone.cfg' >> /etc/motd
6177
-  echo '## ' >> /etc/motd
6178
-  echo '## to continue the installation.' >> /etc/motd
6167
+  #echo ''
6168
+  #echo ''
6169
+  #echo '  *** Rebooting to initialise ssh settings and random number generator ***'
6170
+  #echo ''
6171
+  #echo "  *** Reconnect via ssh on port $SSH_PORT, then run this script again  ***"
6172
+  #echo ''
6173
+  #echo '## ' >> /etc/motd
6174
+  #echo '## Type "su" and enter your administrator password, then use the command:' >> /etc/motd
6175
+  #echo '## ' >> /etc/motd
6176
+  #echo '##   freedombone -c freedombone.cfg' >> /etc/motd
6177
+  #echo '## ' >> /etc/motd
6178
+  #echo '## to continue the installation.' >> /etc/motd
6179
   reboot
6179
   reboot
6180
 }
6180
 }
6181
 
6181
 
10093
           if [[ "$CURRENT_HUBZILLA_COMMIT" != "$HUBZILLA_COMMIT" ]]; then
10093
           if [[ "$CURRENT_HUBZILLA_COMMIT" != "$HUBZILLA_COMMIT" ]]; then
10094
               cd /var/www/$HUBZILLA_DOMAIN_NAME/htdocs
10094
               cd /var/www/$HUBZILLA_DOMAIN_NAME/htdocs
10095
               git stash
10095
               git stash
10096
-              git checkout master             
10096
+              git checkout master
10097
               git pull
10097
               git pull
10098
               git checkout $HUBZILLA_COMMIT
10098
               git checkout $HUBZILLA_COMMIT
10099
               git branch -b $HUBZILLA_COMMIT
10099
               git branch -b $HUBZILLA_COMMIT
10102
           fi
10102
           fi
10103
       fi
10103
       fi
10104
   fi
10104
   fi
10105
-  
10105
+
10106
   if grep -Fxq "install_hubzilla" $COMPLETION_FILE; then
10106
   if grep -Fxq "install_hubzilla" $COMPLETION_FILE; then
10107
       return
10107
       return
10108
   fi
10108
   fi
10131
       else
10131
       else
10132
           sed -i "s/Hubzilla commit.*/Hubzilla commit:$HUBZILLA_COMMIT/g" $COMPLETION_FILE
10132
           sed -i "s/Hubzilla commit.*/Hubzilla commit:$HUBZILLA_COMMIT/g" $COMPLETION_FILE
10133
       fi
10133
       fi
10134
-      
10134
+
10135
       rm -rf /var/www/$HUBZILLA_DOMAIN_NAME/htdocs
10135
       rm -rf /var/www/$HUBZILLA_DOMAIN_NAME/htdocs
10136
       mv hubzilla /var/www/$HUBZILLA_DOMAIN_NAME/htdocs
10136
       mv hubzilla /var/www/$HUBZILLA_DOMAIN_NAME/htdocs
10137
       chown -R www-data:www-data /var/www/$HUBZILLA_DOMAIN_NAME/htdocs
10137
       chown -R www-data:www-data /var/www/$HUBZILLA_DOMAIN_NAME/htdocs