]> arthur.barton.de Git - backup-script.git/blob - examples/backup-script.pre-exec
README.md: Fix some "markdownlint" warnings
[backup-script.git] / examples / backup-script.pre-exec
1 #!/bin/sh
2
3 MOUNTPOINT="/backup"
4
5 echo -n "mounting $MOUNTPOINT read-write ... "
6 mount | grep " $MOUNTPOINT " >/dev/null 2>&1
7 [ $? -eq 0 ] \
8         && mount -o remount,rw,noatime $MOUNTPOINT \
9         || mount -o rw,noatime $MOUNTPOINT
10 if [ $? -eq 0 ]; then
11         echo "ok."
12         exit 0
13 else
14         echo "failed!"
15         exit 1
16 fi
17
18 # -eof-