nsbin/ssa/sub.add.webalizer
Nico Schottelius df2daf524d init
Signed-off-by: Nico Schottelius <nico@manager.schottelius.org>
2017-07-19 17:15:41 +02:00

23 lines
571 B
Bash
Executable file

#!/bin/sh
. `dirname $0`/sub.defaults
if [ $# -ne 4 ]; then
echo $0: TLD SLD SUBDOMAIN VUSER
exit 1
fi
TLD="$1"
SLD="$2"
SUBDOMAIN="$3"
VUSER="$4"
echo -n add: webalizer $SUBDOMAIN.$SLD.$TLD from $WEBALIZER_DEFAULT for $VUSER...
cat "$WEBALIZER_DEFAULT" | sed -e "s/__TLD/$TLD/g" \
-e "s/__SLD/$SLD/g" \
-e "s/__VUSER/$VUSER/g" \
-e "s/__SUBDOMAIN/$SUBDOMAIN/g" > \
$WEBBASE/$VUSER/$TLD/$SLD/$SUBDOMAIN/logs/webalizer/webalizer.conf
echo done.