head	1.8;
access;
symbols
	OPENPKG_E1_MP_HEAD:1.8
	OPENPKG_E1_MP:1.8
	OPENPKG_E1_MP_2_STABLE:1.5.8.1
	OPENPKG_E1_FP:1.5.8.1
	OPENPKG_2_STABLE_MP:1.7
	OPENPKG_2_STABLE_20061018:1.5.8.1
	OPENPKG_2_STABLE_20060622:1.5
	OPENPKG_2_STABLE:1.5.0.8
	OPENPKG_2_STABLE_BP:1.5
	OPENPKG_2_5_RELEASE:1.5
	OPENPKG_2_5_SOLID:1.5.0.6
	OPENPKG_2_5_SOLID_BP:1.5
	OPENPKG_2_4_RELEASE:1.5
	OPENPKG_2_4_SOLID:1.5.0.4
	OPENPKG_2_4_SOLID_BP:1.5
	OPENPKG_CW_FP:1.5
	OPENPKG_2_3_RELEASE:1.5
	OPENPKG_2_3_SOLID:1.5.0.2
	OPENPKG_2_3_SOLID_BP:1.5
	OPENPKG_2_2_RELEASE:1.4
	OPENPKG_2_2_SOLID:1.4.0.2
	OPENPKG_2_2_SOLID_BP:1.4
	OPENPKG_2_1_RELEASE:1.3
	OPENPKG_2_1_SOLID:1.3.0.2
	OPENPKG_2_1_SOLID_BP:1.3
	OPENPKG_2_0_RELEASE:1.1
	OPENPKG_2_0_SOLID:1.1.0.2
	OPENPKG_2_0_SOLID_BP:1.1;
locks; strict;
comment	@# @;


1.8
date	2006.11.14.13.22.55;	author rse;	state Exp;
branches;
next	1.7;
commitid	kKJiS9PbUHt3BDUr;

1.7
date	2006.10.13.15.26.15;	author thl;	state Exp;
branches;
next	1.6;
commitid	yWTFgzNqg349jxQr;

1.6
date	2006.08.25.19.20.00;	author rse;	state Exp;
branches;
next	1.5;
commitid	Tvsj1UyQ8rQ89gKr;

1.5
date	2004.12.07.19.57.41;	author rse;	state Exp;
branches
	1.5.8.1;
next	1.4;

1.4
date	2004.07.06.11.18.33;	author ms;	state Exp;
branches;
next	1.3;

1.3
date	2004.05.10.12.52.50;	author rse;	state Exp;
branches;
next	1.2;

1.2
date	2004.03.11.15.54.55;	author ms;	state Exp;
branches;
next	1.1;

1.1
date	2003.11.02.16.48.56;	author rse;	state Exp;
branches
	1.1.2.1;
next	;

1.5.8.1
date	2006.10.16.14.57.00;	author rse;	state Exp;
branches;
next	;
commitid	iZxwRSmmWscPXUQr;

1.1.2.1
date	2004.04.05.14.12.14;	author rse;	state Exp;
branches;
next	;


desc
@@


1.8
log
@upgrade to syslog NG 2.0.0; add %post/%preun for daemon handling; fix rcService calls; fix default config for listening on 127.0.0.1 by default only
@
text
@#!@@l_prefix@@/bin/openpkg rc
##
##  rc.syslog-ng -- Run-Commands
##

%config
    syslog_ng_enable="$openpkg_rc_def"
    syslog_ng_flags=""
    syslog_ng_log_prolog="true"
    syslog_ng_log_epilog="true"
    syslog_ng_log_numfiles="10"
    syslog_ng_log_minsize="1M"
    syslog_ng_log_complevel="9"
    syslog_ng_additional_logs=""

%common
    syslog_ng_cfgfile="@@l_prefix@@/etc/syslog-ng/syslog-ng.conf"
    syslog_ng_pidfile="@@l_prefix@@/var/syslog-ng/syslog-ng.pid"
    syslog_ng_signal () {
        [ -f $syslog_ng_pidfile ] && kill -$1 `cat $syslog_ng_pidfile`
    }

%status -u @@l_susr@@ -o
    syslog_ng_usable="unknown"
    syslog_ng_active="no"
    rcService syslog_ng enable yes && \
        syslog_ng_signal 0 && syslog_ng_active="yes"
    echo "syslog_ng_enable=\"$syslog_ng_enable\""
    echo "syslog_ng_usable=\"$syslog_ng_usable\""
    echo "syslog_ng_active=\"$syslog_ng_active\""

%start -p 100 -u @@l_susr@@
    rcService syslog-ng enable yes || exit 0
    rcService syslog-ng active yes && exit 0
    @@l_prefix@@/sbin/syslog-ng \
        -f ${syslog_ng_cfgfile} \
        -p ${syslog_ng_pidfile} \
        ${syslog_ng_flags}

%stop -p 900 -u @@l_susr@@
    rcService syslog-ng enable yes || exit 0
    rcService syslog-ng active no  && exit 0
    syslog_ng_signal TERM
    sleep 2
    rm -f $syslog_ng_pidfile >/dev/null 2>&1 || true

%restart -p 100 -u @@l_susr@@
    rcService syslog-ng enable yes || exit 0
    rcService syslog-ng active no  && exit 0
    rc syslog-ng stop start

%daily -u @@l_susr@@
    rcService syslog-ng enable yes || exit 0
    shtool rotate -f \
        -n ${syslog_ng_log_numfiles} -s ${syslog_ng_log_minsize} -d \
        -z ${syslog_ng_log_complevel} -m 644 -o @@l_susr@@ -g @@l_mgrp@@ \
        -P "${syslog_ng_log_prolog}" \
        -E "${syslog_ng_log_epilog}; rc syslog-ng restart" \
        @@l_prefix@@/var/syslog-ng/syslog-ng.log ${syslog_ng_additional_logs}

@


1.7
log
@lint police
@
text
@d33 2
a34 2
    rcService syslog_ng enable yes || exit 0
    rcService syslog_ng active yes && exit 0
d41 2
a42 2
    rcService syslog_ng enable yes || exit 0
    rcService syslog_ng active no  && exit 0
d48 2
a49 2
    rcService syslog_ng enable yes || exit 0
    rcService syslog_ng active no  && exit 0
d53 1
a53 1
    rcService syslog_ng enable yes || exit 0
@


1.6
log
@replace '@@l_prefix@@/lib/openpkg/bash @@l_prefix@@/etc/rc' in shebang with '@@l_prefix@@/bin/openpkg rc' to allow people who run the rc.xxx scripts directly (as executables) to leverage from the Set-UID functionality
@
text
@d26 1
a26 1
    rcService syslog-ng enable yes && \
d33 2
a34 2
    rcService syslog-ng enable yes || exit 0
    rcService syslog-ng active yes && exit 0
d41 2
a42 2
    rcService syslog-ng enable yes || exit 0
    rcService syslog-ng active no  && exit 0
d48 2
a49 2
    rcService syslog-ng enable yes || exit 0
    rcService syslog-ng active no  && exit 0
d53 1
a53 1
    rcService syslog-ng enable yes || exit 0
@


1.5
log
@remove priorities (actually inherited via cut & paste from rc.bind ;-) from packages where the default priority is fully sufficient; fix %stop priorities: they have to be 1000 minus the %start priority in order to stop a package later if it was started earlier.
@
text
@d1 1
a1 1
#!@@l_prefix@@/lib/openpkg/bash @@l_prefix@@/etc/rc
@


1.5.8.1
log
@Mass merge from CURRENT to 2-STABLE (all packages except those of JUNK class)
@
text
@d1 1
a1 1
#!@@l_prefix@@/bin/openpkg rc
d26 1
a26 1
    rcService syslog_ng enable yes && \
d33 2
a34 2
    rcService syslog_ng enable yes || exit 0
    rcService syslog_ng active yes && exit 0
d41 2
a42 2
    rcService syslog_ng enable yes || exit 0
    rcService syslog_ng active no  && exit 0
d48 2
a49 2
    rcService syslog_ng enable yes || exit 0
    rcService syslog_ng active no  && exit 0
d53 1
a53 1
    rcService syslog_ng enable yes || exit 0
@


1.4
log
@in rc.*:%daily, restart daemons per default in shtool epilog should a logfile rotation be performed
@
text
@d40 1
a40 1
%stop -p 100 -u @@l_susr@@
@


1.3
log
@fix broken call to rc and add additional log file variable, both improvements as specified by Cyrus HAMIDI
@
text
@d58 1
a58 1
        -E "${syslog_ng_log_epilog} && rc syslog-ng restart" \
@


1.2
log
@fix rc file calls to rcService
@
text
@d14 1
d50 1
a50 1
    rc syslog_ng stop start
d58 2
a59 2
        -E "${syslog_ng_log_epilog} && rc syslog_ng restart" \
        @@l_prefix@@/var/syslog-ng/syslog-ng.log
@


1.1
log
@new package: syslog-ng 1.6.0rc4 (Syslog Daemon)
@
text
@d25 1
a25 1
    rcService syslog_ng enable yes && \
d32 2
a33 2
    rcService syslog_ng enable yes || exit 0
    rcService syslog_ng active yes && exit 0
d40 2
a41 2
    rcService syslog_ng enable yes || exit 0
    rcService syslog_ng active no  && exit 0
d47 2
a48 2
    rcService syslog_ng enable yes || exit 0
    rcService syslog_ng active no  && exit 0
d52 1
a52 1
    rcService syslog_ng enable yes || exit 0
@


1.1.2.1
log
@MFC: various essential packaging fixes
@
text
@d25 1
a25 1
    rcService syslog-ng enable yes && \
d32 2
a33 2
    rcService syslog-ng enable yes || exit 0
    rcService syslog-ng active yes && exit 0
d40 2
a41 2
    rcService syslog-ng enable yes || exit 0
    rcService syslog-ng active no  && exit 0
d47 2
a48 2
    rcService syslog-ng enable yes || exit 0
    rcService syslog-ng active no  && exit 0
d52 1
a52 1
    rcService syslog-ng enable yes || exit 0
@


