]> git.pld-linux.org Git - packages/syslog-ng.git/commitdiff
- copied from head since these are ok on Ra deadbranch-1.8.2
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 10 Sep 2003 17:44:04 +0000 (17:44 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    syslog-ng.init -> 1.8.2.1

syslog-ng.init

index 212d48abe0be7bb506dd2bf7a1f8483929dc0aa2..b142fd93f64fc9eb8f7fdc43c4da557b25e7c6b0 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# syslog        Starts syslog-ng (syslogd replacment).
+# syslog       Starts syslog-ng (syslogd replacment).
 #
 # chkconfig:   2345 30 70
 # description: Syslog is the facility by which many daemons use to log \
@@ -13,7 +13,7 @@
 # Get network config
 . /etc/sysconfig/network
 
-# Set defaults        
+# Set defaults
 ENABLE_RECEIVE_FROM_NET=no
 HOSTLIST=""
 DOMAINLIST=""
@@ -23,10 +23,11 @@ MARK_TIMESTAMP=""
 [ -f /etc/syslog-ng/syslog-ng.conf ] || exit 0
 
 # Get service config
-if [ -f /etc/sysconfig/syslog-ng ] ; then
-        . /etc/sysconfig/syslog-ng
+if [ -f /etc/sysconfig/syslog-ng ]; then
+       . /etc/sysconfig/syslog-ng
 fi
 
+RETVAL=0
 # See how we were called.
 case "$1" in
   start)
@@ -40,39 +41,37 @@ case "$1" in
                msg_already_running "syslog-ng"
        fi
        ;;
-    stop)      
+  stop)
        if [ -f /var/lock/subsys/syslog-ng ]; then
                msg_stopping "syslog-ng"
                killproc syslog-ng
                rm -f /var/lock/subsys/syslog-ng >/dev/null 2>&1
        else
                msg_not_running syslog-ng
-               exit 1
-       fi      
+       fi
        ;;
   status)
        status syslog-ng
+       exit $?
        ;;
   restart)
        $0 stop
        $0 start
+       exit $?
        ;;
-  reload)
+  reload|force-reload)
        if [ -f /var/lock/subsys/syslog-ng ]; then
                msg_reloading "syslog-ng"
                killproc syslog-ng -HUP
+               RETVAL=$?
        else
-               msg_not_running syslog-ng
-               exit 1
+               msg_not_running syslog-ng >&2
+               exit 7
        fi
        ;;
-  force-reload)
-       $0 reload
-       exit $?
-       ;;
   *)
-       msg_usage "$0 {start|stop|status|restart|reload|force-reload}"
-       exit 1
+       msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
+       exit 3
 esac
 
 exit $RETVAL
This page took 0.084351 seconds and 4 git commands to generate.