#!/bin/sh LOG_USER="qmaill" LOG_GROUP=`id -g ${LOG_USER}` LOG_NAME=`basename ${PWD%/log}` LOG_DIR="/var/log/${LOG_NAME}" if [ ! -d "${LOG_DIR}" ]; then mkdir -p "${LOG_DIR}" chown ${LOG_USER}:${LOG_GROUP} "${LOG_DIR}" echo "Creating log dir for ${LOG_NAME}:" ls -ld "${LOG_DIR}" fi exec 2>&1 exec setuidgid ${LOG_USER} multilog t s2000000 "${LOG_DIR}"