diff options
Diffstat (limited to 'service/run_log')
-rwxr-xr-x | service/run_log | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/service/run_log b/service/run_log new file mode 100755 index 0000000..25d0f62 --- /dev/null +++ b/service/run_log @@ -0,0 +1,13 @@ +#!/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}" |