#!/bin/sh
# aolserver4-newdomain
# LEG24042005
#
#
# Utililty for the aolconf Aolserver4 setup system.
# Sets up the log directory for the server $1, as well as a dummy
# SSL-crt/key and authentication file

if [ $# != 1 ]; then
	ARG0=${0##*/}
	echo "
$ARG0: error: One (1) argument needed!
	
    Usage: $ARG0 servername

$ARG0 sets up logfile, certs and perms for a new virtual server

" >&2

	exit 1
fi

. ./aolconf.conf

install -d -m 2750 -o $AOLUSR -g $ADMGRP $AOLLOG/$1

ln -s $CERTS/main.crt  $CERTS/$1.crt
ln -s $CERTS/main.pem  $CERTS/$1.pem

cp -a $PERMS/main.tcl  $PERMS/$1.tcl

echo "
# Minimal Setup for the server $1
server $1 \"Virtual Server for $1\" {
  fqdn          $1
  bind          virtual
}
"
