Browse Source

Check that obnam installs

Bob Mottram 10 years ago
parent
commit
2ce8242faa
1 changed files with 12 additions and 10 deletions
  1. 12
    10
      install-freedombone.sh

+ 12
- 10
install-freedombone.sh View File

3086
   echo 'install_mediagoblin' >> $COMPLETION_FILE
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
 function create_backup_script {
3089
 function create_backup_script {
3100
   if grep -Fxq "create_backup_script" $COMPLETION_FILE; then
3090
   if grep -Fxq "create_backup_script" $COMPLETION_FILE; then
3101
       return
3091
       return
3102
   fi
3092
   fi
3103
   apt-get -y --force-yes install obnam bcrypt
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
   echo '#!/bin/bash' > /usr/bin/$BACKUP_SCRIPT_NAME
3100
   echo '#!/bin/bash' > /usr/bin/$BACKUP_SCRIPT_NAME
3105
   echo "if [ -b $USB_DRIVE ]; then" >> /usr/bin/$BACKUP_SCRIPT_NAME
3101
   echo "if [ -b $USB_DRIVE ]; then" >> /usr/bin/$BACKUP_SCRIPT_NAME
3106
   echo "  if [ ! -d $USB_MOUNT ]; then" >> /usr/bin/$BACKUP_SCRIPT_NAME
3102
   echo "  if [ ! -d $USB_MOUNT ]; then" >> /usr/bin/$BACKUP_SCRIPT_NAME
3217
       return
3213
       return
3218
   fi
3214
   fi
3219
   apt-get -y --force-yes install obnam bcrypt
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
   echo '#!/bin/bash' > /usr/bin/$RESTORE_SCRIPT_NAME
3222
   echo '#!/bin/bash' > /usr/bin/$RESTORE_SCRIPT_NAME
3221
   echo "if [ -b $USB_DRIVE ]; then" >> /usr/bin/$RESTORE_SCRIPT_NAME
3223
   echo "if [ -b $USB_DRIVE ]; then" >> /usr/bin/$RESTORE_SCRIPT_NAME
3222
   echo "  if [ ! -d $USB_MOUNT ]; then" >> /usr/bin/$RESTORE_SCRIPT_NAME
3224
   echo "  if [ ! -d $USB_MOUNT ]; then" >> /usr/bin/$RESTORE_SCRIPT_NAME