Commit dc46c620 authored by Emmanuel Temam's avatar Emmanuel Temam
Browse files

add deb script

parent d78d2f37
#! /usr/bin/env bash
DESTDIR=/etc/nagios
NRPEFILE=nrpe.cfg
wget -O - https://gitlab.math.univ-paris-diderot.fr/etemam/nrpe3/raw/master/certs/ca_cert.pem > $DESTDIR/ca_cert.pem 2>/dev/null
wget -O - https://gitlab.math.univ-paris-diderot.fr/etemam/nrpe3/raw/master/certs/client_cert.key > $DESTDIR/client_cert.key 2>/dev/null
wget -O - https://gitlab.math.univ-paris-diderot.fr/etemam/nrpe3/raw/master/certs/client_cert.pem > $DESTDIR/client_cert.pem 2>/dev/null
echo "making new nrpe.cfg"
cat $NRPEFILE | grep "^command\[" > $DESTDIR/nrpe.d/local_commands.cfg
wget -O - https://gitlab.math.univ-paris-diderot.fr/etemam/nrpe3/raw/master/tpl_nrpe3_debian.cfg > /tmp/nrpe.cfg 2>/dev/null
mv $NRPEFILE $DESTDIR/nrpe.cfg.bak
mv /tmp/nrpe.cfg $NRPEFILE
echo "Starting nrpe3"
/etc/init.d/nagios-nrpe-server restart
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment