#!/bin/bash # echo "* * * * * root /root/scripts/server/list-web-users.sh" > /etc/cron.d/list-web-users DOMAINROOT="mit.tareo-tz.org" WEBDIR="/var/www/html/html" > $WEBDIR/websites.txt find /var/www/* -maxdepth 0 -type d -print0 | while IFS= read -r -d $'\0' line; do USER=$(basename $line) DOMAIN="$USER.$DOMAINROOT" if [ ! "$USER" == "html" ] && [ ! "$USER" == "pma" ]; then echo "
  • $DOMAIN
  • " >> $WEBDIR/websites.txt fi done