Changes between Version 7 and Version 8 of S3QLBackup


Ignore:
Timestamp:
Nov 3, 2015, 12:40:13 PM (3 years ago)
Author:
chris
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • S3QLBackup

    v7 v8  
    150150#umnt-sshfs $BUCKET
    151151}}}
     152
     153== s3ql_endpoint_check ==
     154
     155S3QL "Transport endpoint is not connected" check script
     156
     157{{{
     158#!bash
     159#!/bin/bash
     160
     161# Check for errors like this with s3ql buckets:
     162# df
     163# df: ‘/media/s3ql/crin1’: Transport endpoint is not connected
     164
     165# check if a Transport endpoint is not connected
     166S3QL_DISCONNECTED_ENDPOINTS=$(df 2>&1 | grep "Transport endpoint is not connected" | awk '{ print $2 }' | tr -d '‘' | tr -d '’:')
     167if [[ "$S3QL_DISCONNECTED_ENDPOINTS" ]]; then
     168        for s3qlfs in $S3QL_DISCONNECTED_ENDPOINTS; do
     169                fusermount -u -z "${s3qlfs}" && \
     170                  { echo "Success unmounting ${s3qlfs}" ; exit 0 ; } || \
     171                  { echo "Problem unmounting ${s3qlfs}, consider using: killall -9 mount.s3ql" ; exit 1 ; }
     172        done
     173fi
     174}}}