diff options
author | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-03 15:48:04 +0200 |
---|---|---|
committer | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-03 15:48:04 +0200 |
commit | 89b7b67a13ebb7965cc7f13ad0595e2194a2d34c (patch) | |
tree | 25efd77a90ae87236e6730d8ea3846bbe0fd126f /service/run_log |
add sqmail-4.2.29asqmail-4.2
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}" |