File: baseconfig

package info (click to toggle)
syslog-ng 4.8.1-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 20,572 kB
  • sloc: ansic: 177,639; python: 13,035; cpp: 11,611; makefile: 7,012; sh: 5,147; java: 3,651; xml: 3,344; yacc: 1,377; lex: 599; perl: 193; awk: 190; objc: 162
file content (28 lines) | stat: -rw-r--r-- 708 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
systemctl stop syslog-ng
/usr/sbin/syslog-ng --syntax-only --cfgfile /etc/syslog-ng/syslog-ng.conf
/usr/sbin/syslog-ng --no-caps --process-mode=background --cfgfile /etc/syslog-ng/syslog-ng.conf --persist-file=/tmp/persist_file --pidfile=/tmp/syslog-ng.pid --control=/tmp/syslog-ng.control >/tmp/syslog_output 2>&1

sleep 2

PID=$(cat /tmp/syslog-ng.pid)

echo "Syslog-ng pid is $PID"

if [ ! -L /proc/$PID/exe ]
then
  echo "syslog-ng could not start"
  exit 1
fi

if [ -s /tmp/syslog_output ]
then
  echo "syslog-ng generated warnings about the config file\n"
  echo "The content of the warnings:"
  cat /tmp/syslog_output
  echo
  exit 1
fi

echo "Syslog-ng was able to start without warnings"

kill $PID