Hmm. I thought if I put the command under the "if" part of that script it would only be issued if the cache disk is >xx% ful, like the mover would in the script?
Maybe I am mistaken, but in this script everything under "if" only runs if the disk threshold is met?
#!/usr/bin/php
<?PHP
$moveAt = 70; # Adjust this value to suit.
$diskTotal = disk_total_space("/mnt/cache");
$diskFree = disk_free_space("/mnt/cache");
$percent = ($diskTotal - $diskFree) / $diskTotal * 100;
if ( $percent > $moveAt ) {
exec("/usr/local/sbin/mover");
}
?>
So I need to figure out on how to combine the script above with these commands.
docker exec comand
mover &&
docker exec comand (when mover is finished)
Not very elegant, but can I replace
exec("/usr/local/sbin/mover");
with
exec("/mnt/user/various/unRaid/script/mover.sh);
Then in the mover.sh I have the
docker exec (command to pause all torrents)
mover &&
docker exec (command to start all torrents)
I get it to work, but then I dont have the threshold part in place.