summaryrefslogtreecommitdiffstats
path: root/tests/dircreate_off.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 16:28:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 16:28:20 +0000
commitdcc721a95bef6f0d8e6d8775b8efe33e5aecd562 (patch)
tree66a2774cd0ee294d019efd71d2544c70f42b2842 /tests/dircreate_off.sh
parentInitial commit. (diff)
downloadrsyslog-dcc721a95bef6f0d8e6d8775b8efe33e5aecd562.tar.xz
rsyslog-dcc721a95bef6f0d8e6d8775b8efe33e5aecd562.zip
Adding upstream version 8.2402.0.upstream/8.2402.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/dircreate_off.sh')
-rwxr-xr-xtests/dircreate_off.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/dircreate_off.sh b/tests/dircreate_off.sh
new file mode 100755
index 0000000..bcd6d1a
--- /dev/null
+++ b/tests/dircreate_off.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+# Test for automatic creation of dynafile directories
+# note that we use the ${RSYSLOG_DYNNAME}.spool directory, because it is handled by diag.sh
+# in any case, so we do not need to add any extra new test dir.
+# added 2009-11-30 by Rgerhards
+# This file is part of the rsyslog project, released under ASL 2.0
+. ${srcdir:=.}/diag.sh init
+generate_conf
+add_conf '
+# set spool locations and switch queue to disk-only mode
+$WorkDirectory '$RSYSLOG_DYNNAME'.spool
+$MainMsgQueueFilename mainq
+$MainMsgQueueType disk
+
+$CreateDirs off
+$template dynfile,'$RSYSLOG_DYNNAME'.OUT_LOG
+*.* ?dynfile
+'
+startup
+injectmsg 0 1 # a single message is sufficient
+shutdown_when_empty # shut down rsyslogd when done processing messages
+wait_shutdown
+if [ -e $RSYSLOG_DYNNAME.logdir/$RSYSLOG_OUT_LOG ]
+then
+ echo "$RSYSLOG_DYNNAME.logdir or logfile WAS created where not permitted to!"
+ error-exit 1
+fi
+exit_test