Files
tareo-scripts/server/list-web-users.sh

14 lines
292 B
Bash
Executable File

#!/bin/bash
DOMAINROOT="mit.tareo-tz.org"
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" ]; then
echo "<li><a href=\"http://$DOMAIN\">$DOMAIN</a></li>"
fi
done