"Fossies" - the Fresh Open Source Software Archive

Member "rsyslog-8.1911.0/tests/abort-uncleancfg-goodcfg.sh" (17 Oct 2019, 931 Bytes) of package /linux/misc/rsyslog-8.1911.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/bash
    2 # Copyright 2015-01-29 by Tim Eifler
    3 # This file is part of the rsyslog project, released  under ASL 2.0
    4 echo ===============================================================================
    5 echo \[abort-uncleancfg-goodcfg.sh\]: testing abort on unclean configuration
    6 echo "testing a good Configuration verification run"
    7 . ${srcdir:=.}/diag.sh init
    8 generate_conf
    9 add_conf '
   10 $AbortOnUncleanConfig on
   11 
   12 $ModLoad ../plugins/imtcp/.libs/imtcp
   13 $MainMsgQueueTimeoutShutdown 10000
   14 $InputTCPServerRun '$TCPFLOOD_PORT'
   15 
   16 $template outfmt,"%msg:F,58:2%\n"
   17 template(name="dynfile" type="string" string=`echo $RSYSLOG_OUT_LOG`) # trick to use relative path names!
   18 :msg, contains, "msgnum:" ?dynfile;outfmt
   19 '
   20 startup
   21 tcpflood -m10 -i1 
   22 shutdown_when_empty # shut down rsyslogd when done processing messages
   23 wait_shutdown
   24 
   25 if [ ! -e  $RSYSLOG_OUT_LOG ]
   26 then
   27         echo "error: expected file does not exist"
   28     error_exit 1
   29 fi
   30 exit_test