[csw-devel] SF.net SVN: gar:[3763] csw/mgar/pkg/nsca/trunk
j_arndt at users.sourceforge.net
j_arndt at users.sourceforge.net
Sat Mar 14 17:25:09 CET 2009
Revision: 3763
http://gar.svn.sourceforge.net/gar/?rev=3763&view=rev
Author: j_arndt
Date: 2009-03-14 16:25:09 +0000 (Sat, 14 Mar 2009)
Log Message:
-----------
nsca: consolidated paths / ownerships / permissions, SMF now with cswclassutils
Modified Paths:
--------------
csw/mgar/pkg/nsca/trunk/Makefile
csw/mgar/pkg/nsca/trunk/checksums
csw/mgar/pkg/nsca/trunk/files/CSWnsca.gspec
csw/mgar/pkg/nsca/trunk/files/CSWnsca.prototype
csw/mgar/pkg/nsca/trunk/files/CSWsendnsca.prototype
csw/mgar/pkg/nsca/trunk/files/submit_check_results.diff
Added Paths:
-----------
csw/mgar/pkg/nsca/trunk/files/cswnsca
Removed Paths:
-------------
csw/mgar/pkg/nsca/trunk/files/CSWnsca.depend
csw/mgar/pkg/nsca/trunk/files/CSWsendnsca.depend
csw/mgar/pkg/nsca/trunk/files/makefile.diff
csw/mgar/pkg/nsca/trunk/files/nsca
csw/mgar/pkg/nsca/trunk/files/nsca.xml
csw/mgar/pkg/nsca/trunk/files/svc-nsca
Modified: csw/mgar/pkg/nsca/trunk/Makefile
===================================================================
--- csw/mgar/pkg/nsca/trunk/Makefile 2009-03-14 14:21:38 UTC (rev 3762)
+++ csw/mgar/pkg/nsca/trunk/Makefile 2009-03-14 16:25:09 UTC (rev 3763)
@@ -10,14 +10,16 @@
MASTER_SITES = http://mesh.dl.sourceforge.net/sourceforge/nagios/
DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz
DISTFILES += $(call admfiles,CSWnsca, prototype checkinstall preinstall )
-DISTFILES += $(call admfiles,CSWsendnsca, preinstall )
-DISTFILES += nsca nsca.xml svc-nsca
+DISTFILES += $(call admfiles,CSWsendnsca, prototype preinstall )
+DISTFILES += cswnsca
PATCHFILES += submit_check_results.diff
-REQUIRED_PKGS_CSWnsca = CSWlibmcrypt CSWlibtoolrt CSWnagios
-REQUIRED_PKGS_CSWsendnsca = CSWlibmcrypt CSWlibtoolrt CSWnagios
+REQUIRED_PKGS_CSWnsca = CSWlibmcrypt CSWlibtoolrt CSWcswclassutils
+REQUIRED_PKGS_CSWsendnsca = CSWlibmcrypt CSWlibtoolrt
+SPKG_CLASSES = none cswinitsmf
+
CONFIGURE_ARGS = $(DIRPATHS)
CONFIGURE_ARGS += --with-nsca-port=5667
@@ -31,10 +33,8 @@
NAGIOSCFGDIR=$(prefix)/nagios/etc
NSCADOCDIR=$(prefix)/share/doc/nsca
SENDNSCADOCDIR=$(prefix)/share/doc/send_nsca
-CFGDIR=$(prefix)/etc
post-install-modulated:
- ginstall -d $(DESTDIR)$(bindir)
ginstall -d $(DESTDIR)$(prefix)/nagios/bin
ginstall -d $(DESTDIR)$(prefix)/nagios/etc
ginstall -m 755 -d $(DESTDIR)$(NSCADOCDIR)
@@ -44,13 +44,14 @@
ginstall -m 644 $(WORKSRC)/LEGAL $(DESTDIR)$(NSCADOCDIR)
ginstall -m 644 $(WORKSRC)/README $(DESTDIR)$(NSCADOCDIR)
ginstall -m 644 $(WORKSRC)/SECURITY $(DESTDIR)$(NSCADOCDIR)
- ginstall -m 755 $(WORKSRC)/src/send_nsca $(DESTDIR)$(BINDIR)
+ ginstall -m 755 $(WORKSRC)/src/send_nsca $(DESTDIR)$(NAGIOSBINDIR)
ginstall -m 755 -d $(DESTDIR)$(SENDNSCADOCDIR)
- ginstall -m 755 -d $(DESTDIR)$(CFGDIR)
ginstall -m 755 $(WORKSRC)/src/submit_check_result-sample $(DESTDIR)$(SENDNSCADOCDIR)
- ginstall -m 600 $(WORKSRC)/sample-config/send_nsca.cfg $(DESTDIR)$(CFGDIR)/send_nsca.cfg
+ ginstall -m 600 $(WORKSRC)/sample-config/send_nsca.cfg $(DESTDIR)$(NAGIOSCFGDIR)/send_nsca.cfg
ginstall -m 644 $(WORKSRC)/Changelog $(DESTDIR)$(SENDNSCADOCDIR)
ginstall -m 644 $(WORKSRC)/LEGAL $(DESTDIR)$(SENDNSCADOCDIR)
ginstall -m 644 $(WORKSRC)/README $(DESTDIR)$(SENDNSCADOCDIR)
ginstall -m 644 $(WORKSRC)/SECURITY $(DESTDIR)$(SENDNSCADOCDIR)
+ ginstall -d $(DESTDIR)/etc/opt/csw/init.d/
+ ginstall -m 755 $(FILEDIR)/cswnsca $(DESTDIR)/etc/opt/csw/init.d/
@$(MAKECOOKIE)
Modified: csw/mgar/pkg/nsca/trunk/checksums
===================================================================
--- csw/mgar/pkg/nsca/trunk/checksums 2009-03-14 14:21:38 UTC (rev 3762)
+++ csw/mgar/pkg/nsca/trunk/checksums 2009-03-14 16:25:09 UTC (rev 3763)
@@ -1,11 +1,10 @@
33a98e7975f633a9489d7a8938ed6131 download/nsca-2.7.2.tar.gz
-f23029e0be9b0379f46a52101c28f328 download/CSWnsca.gspec
-9fa3302e1adfe6fb72e91b3cb0f5fdc3 download/CSWnsca.prototype
+82f1144c12dc6247524609dbeefc3023 download/CSWnsca.gspec
+22cc4e3984d0627708f954c39fa6a22a download/CSWnsca.prototype
1886b15eafd2e2a5a4b230918960ea9a download/CSWnsca.checkinstall
7fef893e65bb68bc0762434dbeace713 download/CSWnsca.preinstall
b82767ed7ab002fea4b3a4395511c93c download/CSWsendnsca.gspec
+49309205ad3d77c99f9bd469cc3860d2 download/CSWsendnsca.prototype
8bf9882f3115e8514ae6d9a866397c71 download/CSWsendnsca.preinstall
-58baa05824b28682cef9e678c3d0cefa download/nsca
-b36f9006d3f725cc8d6cb9c01533a75c download/nsca.xml
-58baa05824b28682cef9e678c3d0cefa download/svc-nsca
-cbb38cacd3ca318f00dfa0877b6017df download/submit_check_results.diff
+e2ea854aa2df24d432ba37ae614f9fa4 download/cswnsca
+08b769c5511342dd03fa01fea44cb260 download/submit_check_results.diff
Deleted: csw/mgar/pkg/nsca/trunk/files/CSWnsca.depend
===================================================================
--- csw/mgar/pkg/nsca/trunk/files/CSWnsca.depend 2009-03-14 14:21:38 UTC (rev 3762)
+++ csw/mgar/pkg/nsca/trunk/files/CSWnsca.depend 2009-03-14 16:25:09 UTC (rev 3763)
@@ -1,3 +0,0 @@
-P CSWlibmcrypt libmcrypt - GPL replacement for Unix crypt that supports a wide range of algorithms and modes
-P CSWlibtoolrt libtool_rt - Generic library support runtime libraries
-P CSWnagios nagios nagios network monitoring base package (no plugins)
Modified: csw/mgar/pkg/nsca/trunk/files/CSWnsca.gspec
===================================================================
--- csw/mgar/pkg/nsca/trunk/files/CSWnsca.gspec 2009-03-14 14:21:38 UTC (rev 3762)
+++ csw/mgar/pkg/nsca/trunk/files/CSWnsca.gspec 2009-03-14 16:25:09 UTC (rev 3763)
@@ -1,8 +1,3 @@
%var bitname nsca
%var pkgname CSWnsca
-%var SERVICE_CONF_FILES /opt/csw/nagios/etc/nsca.cfg
-%var RC_INIT_SCRIPT nsca
-%var SMF_SCRIPT svc-nsca
-%var SMF_MANIFEST nsca.xml
%include url file://%{PKGLIB}/csw_dyndepend.gspec
-%include url file://%{PKGLIB}/smf_enabled.gspec
Modified: csw/mgar/pkg/nsca/trunk/files/CSWnsca.prototype
===================================================================
--- csw/mgar/pkg/nsca/trunk/files/CSWnsca.prototype 2009-03-14 14:21:38 UTC (rev 3762)
+++ csw/mgar/pkg/nsca/trunk/files/CSWnsca.prototype 2009-03-14 16:25:09 UTC (rev 3763)
@@ -1,13 +1,13 @@
-1 d none /opt/csw/nagios/bin 0755 root bin
-1 f none /opt/csw/nagios/bin/nsca 0755 root bin
-1 d none /opt/csw/nagios/etc 0755 root bin
-1 f none /opt/csw/nagios/etc/nsca.cfg 0600 root bin
+1 d none /opt/csw/nagios/bin 0755 nagios nagios
+1 f none /opt/csw/nagios/bin/nsca 0755 nagios nagios
+1 d none /opt/csw/nagios/etc 0755 nagios
+1 f none /opt/csw/nagios/etc/nsca.cfg 0600 nagios nagios
1 d none /opt/csw/share/doc/nsca 0755 root bin
1 f none /opt/csw/share/doc/nsca/Changelog 0644 root bin
1 f none /opt/csw/share/doc/nsca/LEGAL 0644 root bin
1 f none /opt/csw/share/doc/nsca/README 0644 root bin
1 f none /opt/csw/share/doc/nsca/SECURITY 0644 root bin
+f cswinitsmf /etc/opt/csw/init.d/cswnsca 0755 root bin
1 i checkinstall=CSWnsca.checkinstall
-1 i depend=CSWnsca.depend
1 i pkginfo=CSWnsca.pkginfo
1 i preinstall=CSWnsca.preinstall
Deleted: csw/mgar/pkg/nsca/trunk/files/CSWsendnsca.depend
===================================================================
--- csw/mgar/pkg/nsca/trunk/files/CSWsendnsca.depend 2009-03-14 14:21:38 UTC (rev 3762)
+++ csw/mgar/pkg/nsca/trunk/files/CSWsendnsca.depend 2009-03-14 16:25:09 UTC (rev 3763)
@@ -1,3 +0,0 @@
-P CSWlibmcrypt libmcrypt - GPL replacement for Unix crypt that supports a wide range of algorithms and modes
-P CSWlibtoolrt libtool_rt - Generic library support runtime libraries
-P CSWnagios nagios nagios network monitoring base package (no plugins)
Modified: csw/mgar/pkg/nsca/trunk/files/CSWsendnsca.prototype
===================================================================
--- csw/mgar/pkg/nsca/trunk/files/CSWsendnsca.prototype 2009-03-14 14:21:38 UTC (rev 3762)
+++ csw/mgar/pkg/nsca/trunk/files/CSWsendnsca.prototype 2009-03-14 16:25:09 UTC (rev 3763)
@@ -1,13 +1,12 @@
-1 d none /opt/csw/bin 0755 root bin
-1 f none /opt/csw/bin/send_nsca 0755 root bin
-1 d none /opt/csw/etc 0755 root bin
-1 f none /opt/csw/etc/send_nsca.cfg 0644 root bin
+1 d none /opt/csw/nagios/bin 0755 nagios nagios
+1 f none /opt/csw/nagios/bin/send_nsca 0755 nagios nagios
+1 d none /opt/csw/nagios/etc 0755 nagios nagios
+1 f none /opt/csw/nagios/etc/send_nsca.cfg 0644 nagios nagios
1 d none /opt/csw/share/doc/send_nsca 0755 root bin
1 f none /opt/csw/share/doc/send_nsca/Changelog 0644 root bin
1 f none /opt/csw/share/doc/send_nsca/LEGAL 0644 root bin
1 f none /opt/csw/share/doc/send_nsca/README 0644 root bin
1 f none /opt/csw/share/doc/send_nsca/SECURITY 0644 root bin
1 f none /opt/csw/share/doc/send_nsca/submit_check_result-sample 0755 root bin
-1 i depend 102 8932 1233484206
-1 i pkginfo 318 26530 1233484206
-1 i preinstall 1105 19093 1230467644
+1 i pkginfo=CSWsendnsca.pkginfo
+1 i preinstall=CSWsendnsca.preinstall
Added: csw/mgar/pkg/nsca/trunk/files/cswnsca
===================================================================
--- csw/mgar/pkg/nsca/trunk/files/cswnsca (rev 0)
+++ csw/mgar/pkg/nsca/trunk/files/cswnsca 2009-03-14 16:25:09 UTC (rev 3763)
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# Copyright (c) 1992 - 2001 by Sun Microsystems, Inc.
+# All rights reserved.
+#
+#ident "@(#)nsca 1.19 01/12/05 SMI"
+# Modified for OpenCSW by Juergen Arndt 2009-02-08
+# (derived from svc-nrpe written by Alex Moore)
+
+#FMRI application # FMRI path for service
+
+CONFIG_FILE=/opt/csw/nagios/etc/nsca.cfg
+BIN_FILE="/opt/csw/nagios/bin/nsca"
+pidfile=`grep '^pid_file' $CONFIG_FILE |awk '{ FS = "=" } {print $2;}'`
+nsca_USER=`awk -F'=' '/nsca_user/ { print $NF }' $CONFIG_FILE`
+
+case "$1" in
+'restart')
+ [ -n "`pgrep -x -u 0,1,$nsca_USER nsca`" ] && /usr/bin/kill `head -1 $pidfile`
+ # remove pid file
+ if [ -f "$pidfile" ]; then
+ rm "$pidfile"
+ fi
+ if [ -f $CONFIG_FILE ]; then
+ wait 1
+ $BIN_FILE -c $CONFIG_FILE -d
+ fi
+ ;;
+
+'start')
+ if [ -f $CONFIG_FILE ]; then
+ $BIN_FILE -c $CONFIG_FILE -d
+ fi
+ ;;
+
+'stop')
+ [ -n "`pgrep -x -u 0,1,$nsca_USER nsca`" ] && /usr/bin/kill `head -1 $pidfile`
+ # remove pid file
+ if [ -f "$pidfile" ]; then
+ rm "$pidfile"
+ fi
+ ;;
+
+*)
+ echo "Usage: $0 { start | stop | restart }"
+ exit 1
+ ;;
+esac
+exit 0
Deleted: csw/mgar/pkg/nsca/trunk/files/makefile.diff
===================================================================
--- csw/mgar/pkg/nsca/trunk/files/makefile.diff 2009-03-14 14:21:38 UTC (rev 3762)
+++ csw/mgar/pkg/nsca/trunk/files/makefile.diff 2009-03-14 16:25:09 UTC (rev 3763)
@@ -1,46 +0,0 @@
-diff --speed-large-files --minimal -Nru nsca-2.7.2.orig/Makefile.in nsca-2.7.2/Makefile.in
---- nsca-2.7.2.orig/Makefile.in 2003-10-16 01:17:45.000000000 +0200
-+++ nsca-2.7.2/Makefile.in 2009-02-11 10:25:05.717351194 +0100
-@@ -9,6 +9,15 @@
- SRC_BASE=./src/
- SRC_INCLUDE=./include/
-
-+prefix=@prefix@
-+BINDIR=@bindir@
-+NAGIOSBINDIR=@prefix@/nagios/bin
-+NAGIOSCFGDIR=@prefix@/nagios/etc
-+CFGDIR=@sysconfdir@
-+NSCADOCDIR=$(prefix)/share/doc/nsca
-+SENDNSCADOCDIR=@prefix@/share/doc/send_nsca
-+INSTALL=@INSTALL@
-+
- all:
- cd $(SRC_BASE); $(MAKE) $@ ; cd ..
-
-@@ -35,6 +44,26 @@
- @echo "client and server binaries."
- @echo ""
-
-+install-nsca:
-+ $(INSTALL) -m 755 src/nsca $(DESTDIR)$(NAGIOSBINDIR)
-+ $(INSTALL) -m 600 sample-config/nsca.cfg $(DESTDIR)$(NAGIOSCFGDIR)/nsca.cfg
-+ $(INSTALL) -m 755 -d $(DESTDIR)$(NSCADOCDIR)
-+ $(INSTALL) -m 644 ./Changelog $(DESTDIR)$(NSCADOCDIR)
-+ $(INSTALL) -m 644 ./LEGAL $(DESTDIR)$(NSCADOCDIR)
-+ $(INSTALL) -m 644 ./README $(DESTDIR)$(NSCADOCDIR)
-+ $(INSTALL) -m 644 ./SECURITY $(DESTDIR)$(NSCADOCDIR)
-+
-+install-sendnsca:
-+ $(INSTALL) -m 755 src/send_nsca $(DESTDIR)$(BINDIR)
-+ $(INSTALL) -m 755 -d $(DESTDIR)$(SENDNSCADOCDIR)
-+ $(INSTALL) -m 755 -d $(DESTDIR)$(CFGDIR)
-+ $(INSTALL) -m 755 src/submit_check_result-sample $(DESTDIR)$(SENDNSCADOCDIR)
-+ $(INSTALL) -m 600 sample-config/send_nsca.cfg $(DESTDIR)$(CFGDIR)/send_nsca.cfg
-+ $(INSTALL) -m 644 ./Changelog $(DESTDIR)$(SENDNSCADOCDIR)
-+ $(INSTALL) -m 644 ./LEGAL $(DESTDIR)$(SENDNSCADOCDIR)
-+ $(INSTALL) -m 644 ./README $(DESTDIR)$(SENDNSCADOCDIR)
-+ $(INSTALL) -m 644 ./SECURITY $(DESTDIR)$(SENDNSCADOCDIR)
-+
- clean:
- cd $(SRC_BASE); $(MAKE) $@ ; cd ..
- rm -f core
Deleted: csw/mgar/pkg/nsca/trunk/files/nsca
===================================================================
--- csw/mgar/pkg/nsca/trunk/files/nsca 2009-03-14 14:21:38 UTC (rev 3762)
+++ csw/mgar/pkg/nsca/trunk/files/nsca 2009-03-14 16:25:09 UTC (rev 3763)
@@ -1,47 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 1992 - 2001 by Sun Microsystems, Inc.
-# All rights reserved.
-#
-#ident "@(#)nsca 1.19 01/12/05 SMI"
-# Modified for OpenCSW by Juergen Arndt 2009-02-08
-# (derived from svc-nrpe written by Alex Moore)
-
-CONFIG_FILE=/opt/csw/nagios/etc/nsca.cfg
-BIN_FILE="/opt/csw/nagios/bin/nsca"
-pidfile=`grep '^pid_file' $CONFIG_FILE |awk '{ FS = "=" } {print $2;}'`
-nsca_USER=`awk -F'=' '/nsca_user/ { print $NF }' $CONFIG_FILE`
-
-case "$1" in
-'restart')
- [ -n "`pgrep -x -u 0,1,$nsca_USER nsca`" ] && /usr/bin/kill `head -1 $pidfile`
- # remove pid file
- if [ -f "$pidfile" ]; then
- rm "$pidfile"
- fi
- if [ -f $CONFIG_FILE ]; then
- wait 1
- $BIN_FILE -c $CONFIG_FILE -d
- fi
- ;;
-
-'start')
- if [ -f $CONFIG_FILE ]; then
- $BIN_FILE -c $CONFIG_FILE -d
- fi
- ;;
-
-'stop')
- [ -n "`pgrep -x -u 0,1,$nsca_USER nsca`" ] && /usr/bin/kill `head -1 $pidfile`
- # remove pid file
- if [ -f "$pidfile" ]; then
- rm "$pidfile"
- fi
- ;;
-
-*)
- echo "Usage: $0 { start | stop | restart }"
- exit 1
- ;;
-esac
-exit 0
Deleted: csw/mgar/pkg/nsca/trunk/files/nsca.xml
===================================================================
--- csw/mgar/pkg/nsca/trunk/files/nsca.xml 2009-03-14 14:21:38 UTC (rev 3762)
+++ csw/mgar/pkg/nsca/trunk/files/nsca.xml 2009-03-14 16:25:09 UTC (rev 3763)
@@ -1,82 +0,0 @@
-<?xml version='1.0'?>
- <!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
-<!--
-
- Juergen Arndt (opencsw.org) 02/09
- Service manifest for nsca
- -->
-
- <service_bundle type='manifest' name='nsca:nrpe'>
-
- <service
- name='network/cswnsca'
- type='service'
- version='1'>
- <create_default_instance enabled='false' />
- <single_instance />
-
-
- <dependency name='fs'
- grouping='require_all'
- restart_on='none'
- type='service'>
- <service_fmri value='svc:/system/filesystem/local' />
- </dependency>
-
- <dependency
- name='config-file'
- grouping='require_any'
- restart_on='refresh'
- type='path'>
- <service_fmri
- value='file://localhost/opt/csw/nagios/etc/nsca.cfg' />
- </dependency>
-
- <dependency
- name='nagios-command-file'
- grouping='require_any'
- restart_on='none'
- type='path'>
- <service_fmri value='file://localhost/opt/csw/nagios/var/rw/nagios.cmd' />
- </dependency>
-
-
- <dependency name='net'
- grouping='require_all'
- restart_on='none'
- type='service'>
- <service_fmri value='svc:/network/loopback' />
- </dependency>
-
- <dependency name='network'
- grouping='require_all'
- restart_on='none'
- type='service'>
- <service_fmri value='svc:/network/service' />
- </dependency>
-
- <dependency name='syslog'
- grouping='optional_all'
- restart_on='none'
- type='service'>
- <service_fmri value='svc:/system/system-log' />
- </dependency>
-
- <exec_method
- type='method'
- name='start'
- exec='/opt/csw/lib/svc/method/svc-nsca start'
- timeout_seconds='-1'>
- </exec_method>
-
- <exec_method
- type='method'
- name='stop'
- exec='/opt/csw/lib/svc/method/svc-nsca stop'
- timeout_seconds='-1'>
- </exec_method>
-
-
- </service>
-
- </service_bundle>
Modified: csw/mgar/pkg/nsca/trunk/files/submit_check_results.diff
===================================================================
--- csw/mgar/pkg/nsca/trunk/files/submit_check_results.diff 2009-03-14 14:21:38 UTC (rev 3762)
+++ csw/mgar/pkg/nsca/trunk/files/submit_check_results.diff 2009-03-14 16:25:09 UTC (rev 3763)
@@ -37,4 +37,4 @@
+# in turn transmits the data to the nsca daemon on the central
+# monitoring server
+
-+/usr/bin/echo "$1\t$2\t$return_code\t$4" | /opt/csw/bin/send_nsca my.central.server -c /opt/csw/etc/send_nsca.cfg
++/usr/bin/echo "$1\t$2\t$return_code\t$4" | /opt/csw/nagios/bin/send_nsca my.central.server -c /opt/csw/nagios/etc/send_nsca.cfg
Deleted: csw/mgar/pkg/nsca/trunk/files/svc-nsca
===================================================================
--- csw/mgar/pkg/nsca/trunk/files/svc-nsca 2009-03-14 14:21:38 UTC (rev 3762)
+++ csw/mgar/pkg/nsca/trunk/files/svc-nsca 2009-03-14 16:25:09 UTC (rev 3763)
@@ -1,47 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 1992 - 2001 by Sun Microsystems, Inc.
-# All rights reserved.
-#
-#ident "@(#)nsca 1.19 01/12/05 SMI"
-# Modified for OpenCSW by Juergen Arndt 2009-02-08
-# (derived from svc-nrpe written by Alex Moore)
-
-CONFIG_FILE=/opt/csw/nagios/etc/nsca.cfg
-BIN_FILE="/opt/csw/nagios/bin/nsca"
-pidfile=`grep '^pid_file' $CONFIG_FILE |awk '{ FS = "=" } {print $2;}'`
-nsca_USER=`awk -F'=' '/nsca_user/ { print $NF }' $CONFIG_FILE`
-
-case "$1" in
-'restart')
- [ -n "`pgrep -x -u 0,1,$nsca_USER nsca`" ] && /usr/bin/kill `head -1 $pidfile`
- # remove pid file
- if [ -f "$pidfile" ]; then
- rm "$pidfile"
- fi
- if [ -f $CONFIG_FILE ]; then
- wait 1
- $BIN_FILE -c $CONFIG_FILE -d
- fi
- ;;
-
-'start')
- if [ -f $CONFIG_FILE ]; then
- $BIN_FILE -c $CONFIG_FILE -d
- fi
- ;;
-
-'stop')
- [ -n "`pgrep -x -u 0,1,$nsca_USER nsca`" ] && /usr/bin/kill `head -1 $pidfile`
- # remove pid file
- if [ -f "$pidfile" ]; then
- rm "$pidfile"
- fi
- ;;
-
-*)
- echo "Usage: $0 { start | stop | restart }"
- exit 1
- ;;
-esac
-exit 0
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list