3 # The dir containing vserver configuration
4 VSERVERS_CONF="/etc/vservers"
6 for VDIR in "$VSERVERS_CONF"/*; do
8 # Check if its a config dir
9 if [ ! -d "$VDIR" ]; then
13 echo "Hashifying vserver $NAME..."
14 sudo vserver "$NAME" hashify
17 # Change to /tmp, to minimize the chance for an error to damage the root fs
19 echo "Cleaning up unused hashed files..."
20 for HASH_DIR in "$VSERVERS_CONF"/.defaults/apps/vunify/hash/*; do
21 if [ -L "$HASH_DIR" ]; then
23 sudo find -H "$HASH_DIR" -type f -links 1 -print0 | sudo xargs --null --no-run-if-empty rm