3 if [ -z "$BASH_VERSION" ]; then echo "error: shell is not bash" >&2; exit 1; fi
4 source /a
/bin
/errhandle
/err
6 source /a
/bin
/bash_unpublished
/source-state
7 if [[ $HOSTNAME != "$MAIL_HOST" ]]; then
11 # i had a phone which deleted all my contacts in radicale, but kept them
12 # locally. then the phone died months later, and i had no backup of
13 # recent contacts. This checks that those files didnt get deleted or
14 # zerod out, by picking an amount that we dont expect to go below
15 # anytime soon as of 2022.
17 count
=$
(find /o
/radicale
/collections
-type f |
grep -v cache |
wc -l)
19 if (( count
< 220 )); then
20 echo "unexpected file count=$count < 220"
23 size
=$
(du
-s /o
/radicale |
awk '{print $1}')
25 if (( size
< 2000 )); then
26 echo "unexpected kb size=$size < 2000"