Hi all,
I was setting this up and had to change the code for docker to get it to work.
https://autobrr.com/usage/tips#create-the-script
#!/bin/sh
set -e
reqSpace=250000000 # 250GB
SPACE=$(df "/torrents" | awk 'END{print $4}')
if [ "$SPACE" -le $reqSpace ]
then
echo "not enough space"
echo "free $SPACE"
exit 1
fi
echo "got space"
echo "free $SPACE"
exit 0
The {print $4} was displaying the % free of the disk, and not the byte free. I changed it to {print $3} and it worked.
#!/bin/sh
set -e
reqSpace=250000000 # 250GB
SPACE=$(df "/torrents" | awk 'END{print $3}')
if [ "$SPACE" -le $reqSpace ]
then
echo "not enough space"
echo "free $SPACE"
exit 1
fi
echo "got space"
echo "free $SPACE"
exit 0
Not sure if this has been picked up before, or if it's unique to my system.... I'm new when it comes to looking at code!
Hi all,
I was setting this up and had to change the code for docker to get it to work.
https://autobrr.com/usage/tips#create-the-script
The {print $4} was displaying the % free of the disk, and not the byte free. I changed it to {print $3} and it worked.
Not sure if this has been picked up before, or if it's unique to my system.... I'm new when it comes to looking at code!