#!/bin/bash
containers=$(ls /vz/private/)
for CTID in $containers
do
if [ -d /vz/private/$CTID/etc/zpanel/ ]; then
echo "VM: $CTID running zPanel"
# avoid too many arguments error
MOUNTED=$(vzctl exec $CTID cat /proc/mounts | grep /tmp)
if [ -z "$MOUNTED" ]; then
echo "VM ID: $CTID is running...