diff options
author | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2011-07-14 00:05:25 -0300 |
---|---|---|
committer | Nicolas Reynolds <fauno@kiwwwi.com.ar> | 2011-07-14 00:05:25 -0300 |
commit | 598db82f25ffe3557e395a11f379de65af9e1ac1 (patch) | |
tree | 25c3a9daab9b120705adf30fc5924b69538f7184 /testing/syslog-ng/syslog-ng.rc | |
parent | 460c42fc8cd82ed4a7dda7031254c845cec5a9c3 (diff) | |
parent | 29657877f6a02dbba1bd58b417b4ccd211939690 (diff) |
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts:
extra/kdegraphics/PKGBUILD
extra/kdelibs/PKGBUILD
extra/kdemultimedia/PKGBUILD
kde-unstable/kdeaccessibility/PKGBUILD
kde-unstable/kdeadmin/PKGBUILD
kde-unstable/kdeartwork/PKGBUILD
kde-unstable/kdebase-konsole/PKGBUILD
kde-unstable/kdebase-runtime/PKGBUILD
kde-unstable/kdebase-workspace/PKGBUILD
kde-unstable/kdebase/PKGBUILD
kde-unstable/kdebindings-kimono/PKGBUILD
kde-unstable/kdebindings-korundum/PKGBUILD
kde-unstable/kdebindings-kross/PKGBUILD
kde-unstable/kdebindings-perlkde/PKGBUILD
kde-unstable/kdebindings-perlqt/PKGBUILD
kde-unstable/kdebindings-python/PKGBUILD
kde-unstable/kdebindings-qtruby/PKGBUILD
kde-unstable/kdebindings-qyoto/PKGBUILD
kde-unstable/kdebindings-smokegen/PKGBUILD
kde-unstable/kdebindings-smokekde/PKGBUILD
kde-unstable/kdebindings-smokeqt/PKGBUILD
kde-unstable/kdeedu-blinken/PKGBUILD
kde-unstable/kdeedu-cantor/PKGBUILD
kde-unstable/kdeedu-kalgebra/PKGBUILD
kde-unstable/kdeedu-kalzium/PKGBUILD
kde-unstable/kdeedu-kanagram/PKGBUILD
kde-unstable/kdeedu-kbruch/PKGBUILD
kde-unstable/kdeedu-kgeography/PKGBUILD
kde-unstable/kdeedu-khangman/PKGBUILD
kde-unstable/kdeedu-kig/PKGBUILD
kde-unstable/kdeedu-kiten/PKGBUILD
kde-unstable/kdeedu-klettres/PKGBUILD
kde-unstable/kdeedu-kmplot/PKGBUILD
kde-unstable/kdeedu-kstars/PKGBUILD
kde-unstable/kdeedu-ktouch/PKGBUILD
kde-unstable/kdeedu-kturtle/PKGBUILD
kde-unstable/kdeedu-kwordquiz/PKGBUILD
kde-unstable/kdeedu-marble/PKGBUILD
kde-unstable/kdeedu-parley/PKGBUILD
kde-unstable/kdeedu-rocs/PKGBUILD
kde-unstable/kdeedu-step/PKGBUILD
kde-unstable/kdegames/PKGBUILD
kde-unstable/kdegraphics-gwenview/PKGBUILD
kde-unstable/kdegraphics-kamera/PKGBUILD
kde-unstable/kdegraphics-kcolorchooser/PKGBUILD
kde-unstable/kdegraphics-kgamma/PKGBUILD
kde-unstable/kdegraphics-kolourpaint/PKGBUILD
kde-unstable/kdegraphics-kruler/PKGBUILD
kde-unstable/kdegraphics-ksaneplugin/PKGBUILD
kde-unstable/kdegraphics-ksnapshot/PKGBUILD
kde-unstable/kdegraphics-okular/PKGBUILD
kde-unstable/kdegraphics-strigi-analyzer/PKGBUILD
kde-unstable/kdegraphics-svgpart/PKGBUILD
kde-unstable/kdegraphics-thumbnailers/PKGBUILD
kde-unstable/kdelibs/PKGBUILD
kde-unstable/kdemultimedia/PKGBUILD
kde-unstable/kdenetwork/PKGBUILD
kde-unstable/kdepim-runtime/PKGBUILD
kde-unstable/kdepim/PKGBUILD
kde-unstable/kdepimlibs/PKGBUILD
kde-unstable/kdeplasma-addons/PKGBUILD
kde-unstable/kdesdk-kate/PKGBUILD
kde-unstable/kdesdk/PKGBUILD
kde-unstable/kdetoys/PKGBUILD
kde-unstable/kdeutils/PKGBUILD
kde-unstable/kdewebdev/PKGBUILD
kde-unstable/libkdcraw/PKGBUILD
kde-unstable/libkdeedu/PKGBUILD
kde-unstable/libkexiv2/PKGBUILD
kde-unstable/libkipi/PKGBUILD
kde-unstable/libksane/PKGBUILD
Diffstat (limited to 'testing/syslog-ng/syslog-ng.rc')
-rwxr-xr-x | testing/syslog-ng/syslog-ng.rc | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/testing/syslog-ng/syslog-ng.rc b/testing/syslog-ng/syslog-ng.rc new file mode 100755 index 000000000..bb5320b2c --- /dev/null +++ b/testing/syslog-ng/syslog-ng.rc @@ -0,0 +1,63 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +checkconfig() { + syslog-ng -s -f /etc/syslog-ng/syslog-ng.conf + if [ $? -gt 0 ]; then + stat_busy "Configuration error. Please fix your config file (/etc/syslog-ng/syslog-ng.conf)." + stat_fail + exit 0 + fi +} + +PID=`pidof -o %PPID /usr/sbin/syslog-ng` +case "$1" in + start) + stat_busy "Starting Syslog-NG" + checkconfig + [ -z "$PID" ] && /usr/sbin/syslog-ng + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon syslog-ng + stat_done + fi + ;; + stop) + stat_busy "Stopping Syslog-NG" + [ ! -z "$PID" ] && kill $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm -f /var/run/syslog-ng.pid +# Removing stale syslog-ng.persist file. Its new location, as of 2.0.6-1, is /var/lib/syslog-ng/ + rm -f /var/syslog-ng.persist + rm_daemon syslog-ng + stat_done + fi + ;; + reload) + stat_busy "Reloading Syslog-NG configuration and re-opening log files" + if [ -z "$PID" ]; then + stat_fail + else + checkconfig + kill -HUP $PID &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + stat_done + fi + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart|reload}" +esac +exit 0 |