Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

60 lines (49 sloc) 1.533 kb

#!/bin/bash

CURDIR=`pwd` SHINKEN_PACKAGE=shinken-1.0.1.tar.gz SHINKEN_URI=http://www.shinken-monitoring.org/pub/$SHINKEN_PACKAGE

download_url() { if [ -x “/usr/bin/curl” ] ; then /usr/bin/curl -# -O $1 elif [ -x “/usr/bin/wget” ] ; then /usr/bin/wget -q $1 else echo “Unable to install Shinken: can’t find wget or curl in /usr/bin.” exit 1 fi }

do_with_root() {

if [ `whoami` = ‘root’ ] ; then $* elif [ -x /bin/sudo -o -x /usr/bin/sudo ] ; then echo echo “Sudo detected, Shinken will request root privileges to” echo “install. You may be prompted for a password. If you prefer to not use” echo “sudo, please re-run this script as root.” echo “sudo $*” sudo $* else echo “Shinken requires root privileges to install. Please re-run this script as” echo “root.” exit 1 fi }

TMPDIR=`mktemp -d -t shinken-install-XXXXXXX` echo echo “Preparing the temporary directory ” $TMPDIR cd “$TMPDIR”

download_url $SHINKEN_URI echo echo “Unziping the Shinken package” $SHINKEN_PACKAGE tar xfz $SHINKEN_PACKAGE cd shinken-*

do_with_root ./install -i do_with_root ./install -p nagios-plugins do_with_root ./install -p check_mem do_with_root ./install -p manubulon do_with_root ./install -p pnp4nagios

echo “Exiting” cd “$CURDIR” rm -rf “$TMPDIR”

Jump to Line
Something went wrong with that request. Please try again.