mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
syslog-ng: add syntax check to startup script
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
This commit is contained in:
@@ -12,6 +12,12 @@ config_file=/etc/syslog-ng.conf
|
||||
|
||||
start() {
|
||||
[ -f $config_file ] || return 1
|
||||
|
||||
if ! $PROG -s 2>/dev/null ; then
|
||||
echo "Couldn't parse $(basename $config_file)" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
service_start $PROG --process-mode background \
|
||||
-p $SERVICE_PID_FILE
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user