Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#10584 closed defect (fixed)

bug in syslog-ng init script

Reported by: olesz@… Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: packages Version: Backfire 10.03.1 RC6
Keywords: syslog-ng Cc:



The syslog-ng init script has bugs:

  • stop kills the init script before the syslog-ng process could be killed (killall syslog-ng) because the name of the script is also syslog-ng
  • start starts the syslog-ng multiple times

My proposed solution is:

#!/bin/sh /etc/rc.common
# Copyright (C) 2006

start() {
  [ -f /etc/syslog-ng.conf ] || {
    echo "/etc/syslog-ng.conf does not exist !";
    exit 0;
  [ -f $PIDFILE ] && {
    echo "syslog-ng is already running `cat $PIDFILE`!";
    exit 0;
  [ -d /var/run ] || mkdir -p /var/run
  [ -x /usr/sbin/syslog-ng ] && /usr/sbin/syslog-ng --pidfile $PIDFILE

stop() {
  kill `cat $PIDFILE`

restart() {
        sleep 1

reload() {
        kill -HUP `cat $PIDFILE` &>/dev/null

Attachments (0)

Change History (2)

comment:1 Changed 6 years ago by swalker

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r30168.

comment:2 Changed 4 years ago by jow

  • Milestone changed from Backfire 10.03.2 to Chaos Calmer (trunk)

Milestone Backfire 10.03.2 deleted

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.