Ticket #4898: syslog-ng.init

File syslog-ng.init, 427 bytes (added by jake1981 <oskari.rauta@…>, 7 years ago)
Line 
1#!/bin/sh /etc/rc.common
2# Copyright (C) 2006 OpenWrt.org
3START=03
4
5start() {
6  [ -f /etc/syslog-ng/syslog-ng.conf ] || {
7    echo "/etc/syslog-ng/syslog-ng.conf does not exist !";
8    exit 0;
9  };
10  [ -d /var/run ] || mkdir -p /var/run
11  [ -x /usr/sbin/syslog-ng ] && /usr/sbin/syslog-ng
12}
13
14stop() {
15  killall syslog-ng
16}
17
18restart() {
19        stop
20        sleep 1
21        start
22}
23
24reload() {
25        kill -HUP `cat /var/run/syslog-ng.pid` &>/dev/null
26}
27