45 lines
1.5 KiB
Bash
Executable File
45 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Global Startup / Control script for Pandora FMS
|
|
# Written by A. Delgado, contributed to Pandora FMS project
|
|
# (c) A.Delgado 2008
|
|
|
|
if [ $# -eq 0 ]
|
|
then
|
|
|
|
echo -e "\nPandora FMS 2.0 Control script - http://pandorafms.org
|
|
Usage: pandora start/stop [server] [server] ...
|
|
|
|
Servers : pandora_server pandora_network pandora_recon pandora_snmpconsole \n pandora_prediction pandora_plugin pandora_wmi \n"
|
|
exit 0
|
|
fi
|
|
|
|
|
|
ACCION=$1
|
|
SERVIDOR2=$2
|
|
SERVIDOR3=$3
|
|
SERVIDOR4=$4
|
|
SERVIDOR5=$5
|
|
SERVIDOR6=$6
|
|
SERVIDOR7=$7
|
|
SERVIDOR8=$8
|
|
|
|
if [ $# -eq 1 ]
|
|
then
|
|
/etc/init.d/pandora_server $ACCION
|
|
/etc/init.d/pandora_network $ACCION
|
|
/etc/init.d/pandora_recon $ACCION
|
|
/etc/init.d/pandora_snmpconsole $ACCION
|
|
/etc/init.d/pandora_prediction $ACCION
|
|
/etc/init.d/pandora_plugin $ACCION
|
|
/etc/init.d/pandora_wmi $ACCION
|
|
else
|
|
[ ! -z $SERVIDOR2 ] && /etc/init.d/$SERVIDOR2 $ACCION && echo -e "\n$ACCION server $SERVIDOR2\n"
|
|
[ ! -z $SERVIDOR3 ] && /etc/init.d/$SERVIDOR3 $ACCION && echo -e "\n$ACCION server $SERVIDOR3\n"
|
|
[ ! -z $SERVIDOR4 ] && /etc/init.d/$SERVIDOR4 $ACCION && echo -e "\n$ACCION server $SERVIDOR4\n"
|
|
[ ! -z $SERVIDOR5 ] && /etc/init.d/$SERVIDOR5 $ACCION && echo -e "\n$ACCION server $SERVIDOR5\n"
|
|
[ ! -z $SERVIDOR6 ] && /etc/init.d/$SERVIDOR6 $ACCION && echo -e "\n$ACCION server $SERVIDOR6\n"
|
|
[ ! -z $SERVIDOR7 ] && /etc/init.d/$SERVIDOR7 $ACCION && echo -e "\n$ACCION server $SERVIDOR7\n"
|
|
[ ! -z $SERVIDOR8 ] && /etc/init.d/$SERVIDOR8 $ACCION && echo -e "\n$ACCION server $SERVIDOR8\n"
|
|
fi
|