I've modified action.php so I can use du -sh command for reporting dir size, but executing du -sh every few seconds is too often on a busy system with 5-6 rtorrent instances.
I want diskspace to show the top level directory size as defined in config.php
I have made a bash script which runs du -s via cron every 2 minutes
Code:
#!/bin/bash
DIRECTORY=/home/user1
SIZE=$(du -s $DIRECTORY | awk '{print $1}')
echo "$SIZE" > /home/user1/used.txt
Another similar script will check that users quota making the file "available.txt"
Now I need to change the action.php in the diskspace plugin to read these values from the 2 text files which are stored in the users top directory as specified in config.php.
This will change the way diskspace reports, from reading the full partition size to just showing a directory size.