puppet: Remove icinga_command_proxy

No longer in use.

refs #6842
This commit is contained in:
Eric Lippmann 2014-12-15 12:12:35 +01:00
parent 37ad4f7623
commit dcbf8c5661
2 changed files with 0 additions and 113 deletions

View File

@ -1,71 +0,0 @@
#!/bin/bash
#
# chkconfig: 345 99 01
#
### BEGIN INIT INFO
# Provides: icinga_command_proxy
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Should-Start: icinga
# Should-Stop: icinga
### END INIT INFO
# Source function library.
. /etc/rc.d/init.d/functions
PROG="icinga_command_proxy"
BIN="/usr/local/bin/icinga_command_proxy"
if [[ -f /etc/sysconfig/$PROG ]]; then
. /etc/sysconfig/$PROG
fi
ICINGA_CMD=${ICINGA_CMD:-"/usr/local/icinga/var/rw/icinga.cmd"}
ICINGA_MYSQL_CMD=${ICINGA_MYSQL_CMD:-"/usr/local/icinga-mysql/var/rw/icinga.cmd"}
ICINGA_PGSQL_CMD=${ICINGA_PGSQL_CMD:-"/usr/local/icinga-pgsql/var/rw/icinga.cmd"}
LOCKFILE=${LOCKFILE:-/var/lock/subsys/$PROG}
PIDFILE=${PIDFILE:-/var/lock/subsys/$PROG/$PROG.pid}
RETVAL=0
start() {
echo -n $"Starting $PROG: "
daemon --pidfile="$PIDFILE" "nohup \"$BIN\" \"$ICINGA_CMD\" \"$ICINGA_MYSQL_CMD\" \"$ICINGA_PGSQL_CMD\" >/dev/null 2>&1 &"
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch "$LOCKFILE"
return $RETVAL
}
stop() {
echo -n $"Stopping $PROG: "
killproc -p "$PIDFILE" "$BIN"
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f "$LOCKFILE" "$PIDFILE"
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status -p "$PIDFILE" "$BIN"
RETVAL=$?
;;
restart)
stop
start
;;
*)
echo $"Usage: $PROG {start|stop|restart|status}"
RETVAL=2
esac
exit $RETVAL

View File

@ -1,42 +0,0 @@
#!/bin/bash
#
# Redirect commands from pipe A to pipe B and C
#
set -e
set -u
ICINGA_CMD=${1:-"/usr/local/icinga/var/rw/icinga.cmd"}
ICINGA_MYSQL_CMD=${2:-"/usr/local/icinga-mysql/var/rw/icinga.cmd"}
ICINGA_PGSQL_CMD=${3:-"/usr/local/icinga-pgsql/var/rw/icinga.cmd"}
trap 'rm -f "$ICINGA_CMD"; exit' EXIT SIGKILL
if [[ -p "$ICINGA_CMD" ]]; then
rm -f "$ICINGA_CMD"
fi
mkfifo -m 660 "$ICINGA_CMD"
chown icinga.icinga-cmd "$ICINGA_CMD"
while true
do
if read COMMAND
then
if [[ -p "$ICINGA_MYSQL_CMD" ]]; then
echo "$COMMAND" > "$ICINGA_MYSQL_CMD"
else
logger -p local0.err Can\'t distribute command to the Icinga MySQL instance since its command pipe doesn\'t exist
fi
if [[ -p "$ICINGA_PGSQL_CMD" ]]; then
echo "$COMMAND" > "$ICINGA_PGSQL_CMD"
else
logger -p local0.err Can\'t distribute command to the Icinga PostgreSQL instance since its command pipe doesn\'t exist
fi
fi
done < "$ICINGA_CMD" 3> "$ICINGA_CMD"
# Reset all traps
trap - EXIT SIGKILL
exit 0