From: Heiko Z. <smi...@us...> - 2006-08-20 19:51:31
|
Update of /cvsroot/devil-linux/build/scripts In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv7517/scripts Modified Files: sagator xinetd Added Files: nagios nagios-plugins nrpe nsca Log Message: added nagios nagios-plugin still needs work, since it hardcodes path names and didn't find everything --- NEW FILE: nrpe --- #!/bin/bash # $Source: /cvsroot/devil-linux/build/scripts/nrpe,v $ # $Revision: 1.2 $ # $Date: 2006/08/20 19:51:27 $ # # http://www.devil-linux.org # you need the next line, otherwise script won't be executed !!! # DL-build-system v3 ### BEGIN INIT INFO # Provides: nrpe # Required-Start: $basebuildtools $libs nagios nagios-plugins xinetd # Required-Stop: # Default-Start: 1 2 # Default-Stop: # Description: Nagios nrpe ### END INIT INFO # get the directoryname of the script MYDIR=${0%/*} # source functions and config source $MYDIR/settings case $1 in build ) if [ "$CONFIG_NAGIOS" = "y" ]; then ./configure --prefix=/usr --libexecdir=/usr/libexec/nagios --sysconfdir=/etc/nagios || exit 1 make $PMAKE all || exit 1 strip_debug fi ;; install ) if [ "$CONFIG_NAGIOS" = "y" ]; then cp -v src/nrpe $CDDIR/usr/sbin/ || exit 1 cp -v src/check_nrpe $CDDIR/usr/libexec/nagios/ || exit 1 cp -v sample-config/nrpe.cfg $ETCDIR/etc/nagios/ || exit 1 cp -v sample-config/nrpe.xinetd $ETCDIR/etc/xinet.d/ || exit 1 echo "nrpe 5666/tcp # NRPE" >> $ETCDIR/etc/services || exit 1 cp $MYDIR/scripts/nrpe $ETCDIR/etc/init.d || exit 1 echo "# Start the Nagios Remote Program Execution daemon?" >> $CONFIGFILE echo "START_NRPE=no" >> $CONFIGFILE echo >> $CONFIGFILE echo "HELP_NRPE=\"Nagios Remote Program Execution daemon\"" >> $SOFTWAREHELP fi ;; * ) echo "ERROR ($0)" echo "please add parameter so I know what to do" exit 1 ;; esac --- NEW FILE: nagios --- #!/bin/bash # $Source: /cvsroot/devil-linux/build/scripts/nagios,v $ # $Revision: 1.2 $ # $Date: 2006/08/20 19:51:27 $ # # http://www.devil-linux.org # you need the next line, otherwise script won't be executed !!! # DL-build-system v3 ### BEGIN INIT INFO # Provides: nagios # Required-Start: $basebuildtools $libs # Required-Stop: # Default-Start: 1 2 # Default-Stop: # Description: Nagios ### END INIT INFO # get the directoryname of the script MYDIR=${0%/*} # source functions and config source $MYDIR/settings case $1 in build ) if [ "$CONFIG_NAGIOS" = "y" ]; then ./configure --prefix=/usr --with-lockfile=/var/run/nagios.lock --with-init-dir=/etc/init.d --sysconfdir=/etc/nagios \ --datadir=/usr/share/nagios --localstatedir=/var/nagios --sbindir=/usr/sbin/nagios || exit 1 make $PMAKE all || exit 1 strip_debug fi ;; install ) if [ "$CONFIG_NAGIOS" = "y" ]; then rm -rf $TMPDIR || exit 1 mkdir $TMPDIR || exit 1 userdel nagios &> /dev/null groupadd -f -g 66 nagios || exit 1 useradd -u 66 -g nagios -s /bin/false -d /var/nagios nagios || exit 1 make install install-commandmode install-config DESTDIR=$TMPDIR || exit 1 copy_docs $TMPDIR mkdir -p $CDDIR/var/nagios || exit 1 chown nagios.nagios $CDDIR/var/nagios || exit 1 cp -dpvR $TMPDIR/usr $CDDIR/ || exit 1 cp -dpvR $TMPDIR/etc $ETCDIR/ || exit 1 rm -rf $TMPDIR || exit 1 cp $MYDIR/scripts/nagios $ETCDIR/etc/init.d || exit 1 echo "# Start the Nagios daemon?" >> $CONFIGFILE echo "START_NAGIOS=no" >> $CONFIGFILE echo >> $CONFIGFILE echo "HELP_NAGIOS=\"Nagios System and Network Monitoring Daemon\"" >> $SOFTWAREHELP fi ;; * ) echo "ERROR ($0)" echo "please add parameter so I know what to do" exit 1 ;; esac --- NEW FILE: nagios-plugins --- #!/bin/bash # $Source: /cvsroot/devil-linux/build/scripts/nagios-plugins,v $ # $Revision: 1.2 $ # $Date: 2006/08/20 19:51:27 $ # # http://www.devil-linux.org # you need the next line, otherwise script won't be executed !!! # DL-build-system v3 ### BEGIN INIT INFO # Provides: nagios-plugins # Required-Start: $basebuildtools $libs nagios ntp samba openssh net-snmp # Required-Stop: # Default-Start: 1 2 # Default-Stop: # Description: Nagios plugins ### END INIT INFO # get the directoryname of the script MYDIR=${0%/*} # source functions and config source $MYDIR/settings case $1 in build ) if [ "$CONFIG_NAGIOS" = "y" ]; then ./configure --prefix=/usr --libexecdir=/usr/libexec/nagios --disable-rpath || exit 1 make $PMAKE all || exit 1 strip_debug fi ;; install ) if [ "$CONFIG_NAGIOS" = "y" ]; then rm -rf $TMPDIR || exit 1 mkdir $TMPDIR || exit 1 make install DESTDIR=$TMPDIR || exit 1 copy_docs $TMPDIR cp -dpvR $TMPDIR/usr $CDDIR/ || exit 1 rm -rf $TMPDIR || exit 1 fi ;; * ) echo "ERROR ($0)" echo "please add parameter so I know what to do" exit 1 ;; esac Index: xinetd =================================================================== RCS file: /cvsroot/devil-linux/build/scripts/xinetd,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- xinetd 11 Jan 2004 14:43:05 -0000 1.9 +++ xinetd 20 Aug 2006 19:51:27 -0000 1.10 @@ -40,6 +40,7 @@ cp -dp xinetd/xinetd $CDDIR/usr/sbin || exit 1 cp -dp xinetd/itox $CDDIR/usr/sbin || exit 1 cp -dp xinetd/sample.conf $ETCDIR/etc/xinetd.conf.sample || exit 1 + mkdir -p $ETCDIR/etc/xinet.d || exit 1 cp $MYDIR/scripts/xinetd $ETCDIR/etc/init.d || exit 1 copy_man ./xinetd mkdir -p $CDDIR/usr/share/man/man5 --- NEW FILE: nsca --- #!/bin/bash # $Source: /cvsroot/devil-linux/build/scripts/nsca,v $ # $Revision: 1.2 $ # $Date: 2006/08/20 19:51:27 $ # # http://www.devil-linux.org # you need the next line, otherwise script won't be executed !!! # DL-build-system v3 ### BEGIN INIT INFO # Provides: nsca # Required-Start: $basebuildtools $libs nagios nagios-plugins xinetd # Required-Stop: # Default-Start: 1 2 # Default-Stop: # Description: Nagios nsca ### END INIT INFO # get the directoryname of the script MYDIR=${0%/*} # source functions and config source $MYDIR/settings case $1 in build ) if [ "$CONFIG_NAGIOS" = "y" ]; then ./configure --prefix=/usr --libexecdir=/usr/libexec/nagios --sysconfdir=/etc/nagios || exit 1 make $PMAKE all || exit 1 strip_debug fi ;; install ) if [ "$CONFIG_NAGIOS" = "y" ]; then cp -v src/nsca $CDDIR/usr/sbin/ || exit 1 cp -v src/send_nsca $CDDIR/usr/sbin/ || exit 1 cp -v sample-config/*.cfg $ETCDIR/etc/nagios/ || exit 1 cp -v sample-config/nsca.xinetd $ETCDIR/etc/xinet.d/ || exit 1 echo "nsca 5667/tcp # NSCA" >> $ETCDIR/etc/services || exit 1 cp $MYDIR/scripts/nsca $ETCDIR/etc/init.d || exit 1 echo "# Start the Nagios Secure Communication daemon?" >> $CONFIGFILE echo "START_NSCA=no" >> $CONFIGFILE echo >> $CONFIGFILE echo "HELP_NSCA=\"Nagios Secure Communication daemon\"" >> $SOFTWAREHELP fi ;; * ) echo "ERROR ($0)" echo "please add parameter so I know what to do" exit 1 ;; esac |