Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- MOUNT_POINT=/home/mastodon/wasabi/backups
- BUCKET=backups
- OPTION="--endpoint https://s3.wasabisys.com --profile wasabi"
- /bin/mountpoint ${MOUNT_POINT}
- if [ 0 = $? ]
- then
- echo `date --rfc-2822` ": keeping mount s3 via goofys"
- return 0
- else
- echo `date --rfc-2822` ": unexpected umount s3" 1>&2
- # try re-mount
- echo "try remount goofys..." 1>&2
- /bin/umount ${MOUNT_POINT}
- /home/pleroma/bin/goofys ${OPTION} ${BUCKET} ${MOUNT_POINT}
- if [ 0 = $? ]
- then
- echo "success remount goofys" 1>&2
- else
- echo "failed remount goofys" 1>&2
- fi
- return 1
- fi
Advertisement
Add Comment
Please, Sign In to add comment