diff options
Diffstat (limited to 'deploy/adapters/ansible/roles/storage/files/get_var_size.sh')
-rwxr-xr-x | deploy/adapters/ansible/roles/storage/files/get_var_size.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/storage/files/get_var_size.sh b/deploy/adapters/ansible/roles/storage/files/get_var_size.sh new file mode 100755 index 00000000..6f690375 --- /dev/null +++ b/deploy/adapters/ansible/roles/storage/files/get_var_size.sh @@ -0,0 +1,6 @@ +size=`df /var | awk '$3 ~ /[0-9]+/ { print $4 }'`; +if [ $size -gt 2000000000 ]; then + echo -n 2000000000000; +else + echo -n $((size * 1000 / 512 * 512)); +fi |