3 # The dir containing vserver configuration
4 VSERVERS_CONF=/etc/vservers
8 if [ ! -d $NAME ]; then
11 if ! sudo vserver $NAME status &> /dev/null; then
15 echo "Hashifying vserver $NAME..."
16 sudo vserver $NAME hashify
19 # Change to /tmp, to minimize the chance for an error to damage the root fs
21 echo "Cleaning up unused hashed files..."
22 for HASH_DIR in $VSERVERS_CONF/.defaults/apps/vunify/hash/*; do
23 if [ -L $HASH_DIR ]; then
25 sudo find -H $HASH_DIR -type f -links 1 -print0 | sudo xargs -0 rm