Selaa lähdekoodia

Check that obnam installs

Bob Mottram 10 vuotta sitten
vanhempi
commit
2ce8242faa
1 muutettua tiedostoa jossa 12 lisäystä ja 10 poistoa
  1. 12
    10
      install-freedombone.sh

+ 12
- 10
install-freedombone.sh Näytä tiedosto

@@ -3086,21 +3086,17 @@ function install_mediagoblin {
3086 3086
   echo 'install_mediagoblin' >> $COMPLETION_FILE
3087 3087
 }
3088 3088
 
3089
-function decrypt_file {
3090
-    if [ ! $FILE_TO_DECRYPT ]; then
3091
-        return
3092
-    fi
3093
-    if [ ! -d $FILE_TO_DECRYPT ]; then
3094
-        return
3095
-    fi
3096
-    bcrypt $FILE_TO_DECRYPT
3097
-}
3098
-
3099 3089
 function create_backup_script {
3100 3090
   if grep -Fxq "create_backup_script" $COMPLETION_FILE; then
3101 3091
       return
3102 3092
   fi
3103 3093
   apt-get -y --force-yes install obnam bcrypt
3094
+
3095
+  if [ ! -d /etc/obnam ]; then
3096
+	  echo 'obnam may not have installed correctly. Check your internet connection, /etc/network/interfaces and /etc/resolv.conf'
3097
+	  exit 46
3098
+  fi
3099
+
3104 3100
   echo '#!/bin/bash' > /usr/bin/$BACKUP_SCRIPT_NAME
3105 3101
   echo "if [ -b $USB_DRIVE ]; then" >> /usr/bin/$BACKUP_SCRIPT_NAME
3106 3102
   echo "  if [ ! -d $USB_MOUNT ]; then" >> /usr/bin/$BACKUP_SCRIPT_NAME
@@ -3217,6 +3213,12 @@ function create_restore_script {
3217 3213
       return
3218 3214
   fi
3219 3215
   apt-get -y --force-yes install obnam bcrypt
3216
+
3217
+  if [ ! -d /etc/obnam ]; then
3218
+	  echo 'obnam may not have installed correctly. Check your internet connection, /etc/network/interfaces and /etc/resolv.conf'
3219
+	  exit 47
3220
+  fi
3221
+
3220 3222
   echo '#!/bin/bash' > /usr/bin/$RESTORE_SCRIPT_NAME
3221 3223
   echo "if [ -b $USB_DRIVE ]; then" >> /usr/bin/$RESTORE_SCRIPT_NAME
3222 3224
   echo "  if [ ! -d $USB_MOUNT ]; then" >> /usr/bin/$RESTORE_SCRIPT_NAME