Server IP : 10.255.242.198  /  Your IP : 216.73.216.180
Web Server : Apache
System : Linux tb-de01-linweb251 6.1.171-hcl #deb11 SMP Fri May 8 14:45:55 UTC 2026 x86_64
User : root ( 0)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF
Directory (0755) :  /data/sites/web/b13zkbhmyrdbxio/www/../.raidboxes/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /data/sites/web/b13zkbhmyrdbxio/www/../.raidboxes/cleanup-tmp-files.sh
#!/bin/bash
set -Eeuo pipefail

USER="$(id -u -n)"
TMP_DIRECTORY="${HOME:0:-1}/tmp"
test "$USER" != ""
test -d "$TMP_DIRECTORY"

# Delete all directories and files, which are unmodified since 30 minutes,
# when storage metadata limit is almost reached inside tmp directory.
METADATA_LIMIT_CHECK="$(find "${TMP_DIRECTORY}" -type d -size +12M 2> /dev/null || :)"
if [ "$METADATA_LIMIT_CHECK" != "" ]; then
    echo "Purging everything in ${TMP_DIRECTORY}/*, cause storage metadata limit is almost reached"
    find "${TMP_DIRECTORY}/" -user "${USER}" -mmin +30 -delete || :
fi

# Delete PHP session files, which are unmodified since 30 minutes
find "${TMP_DIRECTORY}/" -user "${USER}" -name "sess_*" -mmin +30 -delete || :

# Delete all other temporary files, which are unmodified since 48 hours
find "${TMP_DIRECTORY}/" -user "${USER}" -mmin +2880 -delete || :