April 26, 20233 yr I'm looking to add a script in a container that needs to pull the current size of the cache disk. The example I'm working from assumes it's pointing at the space available to the /downloads/ folder. But in this case wouldn't that return the whole array? Can I instead somehow pass through a mapping to reference that would return the available space of the cache disk instead? Would pointing to the /appdata/ folder or the specific applications /appdata/config/ work, since it is already mapped in the container? Here is the example I'm working from: #!/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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.