git.lirion.de

Of git, get, and gud

summaryrefslogtreecommitdiffstats
path: root/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/install.sh')
-rwxr-xr-xnagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/install.sh50
1 files changed, 50 insertions, 0 deletions
diff --git a/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/install.sh b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/install.sh
new file mode 100755
index 0000000..bbad493
--- /dev/null
+++ b/nagios-plugins-contrib-24.20190301~bpo9+1/check_hp_bladechassis/check_hp_bladechassis-1.0.1/install.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+if [ "`uname -m`" = "x86_64" ]; then
+ def_install_dir=/usr/lib64/nagios/plugins
+else
+ def_install_dir=/usr/lib/nagios/plugins
+fi
+def_mandir=/usr/share/man/man8
+
+if [ "$1" = "-q" ]; then
+ install_dir=$def_install_dir
+ mandir=$def_mandir
+else
+ echo -n "Plugin dir [$def_install_dir]: "
+ read install_dir
+ if [ "$install_dir" = "" ]; then
+ install_dir=$def_install_dir
+ fi
+ echo -n "Man page dir [$def_mandir]: "
+ read mandir
+ if [ "$mandir" = "" ]; then
+ mandir=$def_mandir
+ fi
+fi
+
+if [ -d $install_dir ]; then
+ :
+else
+ echo "ERROR: Plugin directory $install_dir doesn't exist,"
+ echo "ERROR: or is not a directory"
+ exit 1
+fi
+
+if [ -d $mandir ]; then
+ :
+else
+ echo "ERROR: Man page directory $mandir doesn't exist,"
+ echo "ERROR: or is not a directory"
+ exit 1
+fi
+
+# The script and symlinks
+cp check_hp_bladechassis $install_dir
+
+# The man page
+cp check_hp_bladechassis.8 $mandir
+
+# Done
+echo "done."
+exit 0