#!/bin/sh
# Pour install l'agent GLPI

GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NOCOLOR='\033[0m'

echo "${YELLOW} *** ${NOCOLOR} Mise en place des droits"
echo "${NOCOLOR}"

chmod +x ./01-ssh/script.sh >> /dev/null
chmod +x ./02-apt/script.sh >> /dev/null
chmod +x ./03-cortex/script.sh >> /dev/null
chmod +x ./04-agent-glpi/script.sh >> /dev/null
chmod +x ./05-manageengine/script.sh >> /dev/null
chmod +x ./06-snmp/script.sh >> /dev/null
chmod +x ./07-DNS/script.sh >> /dev/null
chmod +x ./08-NRPE/script.sh >> /dev/null

echo "${YELLOW} *** ${NOCOLOR} Mise en place des droits : ${GREEN} OK"
echo "${NOCOLOR}"

echo "${YELLOW} *** ${NOCOLOR} Lancement du script : SSH"
echo "${NOCOLOR}"

./01-ssh/script.sh

echo "${YELLOW} *** ${NOCOLOR} Fin du script : SSH : ${GREEN} OK"
echo "${NOCOLOR}"

echo "${YELLOW} *** ${NOCOLOR} Lancement du script : APT"
echo "${NOCOLOR}"

./02-apt/script.sh

echo "${YELLOW} *** ${NOCOLOR} Fin du script : APT : ${GREEN} OK"
echo "${NOCOLOR}"

echo "${YELLOW} *** ${NOCOLOR} Lancement du script : Cortex"
echo "${NOCOLOR}"

./03-cortex/script.sh

echo "${YELLOW} *** ${NOCOLOR} Fin du script : Cortex : ${GREEN} OK"
echo "${NOCOLOR}"

echo "${YELLOW} *** ${NOCOLOR} Lancement du script : GLPI"
echo "${NOCOLOR}"

./04-agent-glpi/script.sh

echo "${YELLOW} *** ${NOCOLOR} Fin du script : GLPI : ${GREEN} OK"
echo "${NOCOLOR}"

echo "${YELLOW} *** ${NOCOLOR} Lancement du script : SNMP"
echo "${NOCOLOR}"

./06-snmp/script.sh

echo "${YELLOW} *** ${NOCOLOR} Fin du script : SNMP : ${GREEN} OK"
echo "${NOCOLOR}"

echo "${YELLOW} *** ${NOCOLOR} Lancement du script : DNS"
echo "${NOCOLOR}"

./07-DNS/script.sh

echo "${YELLOW} *** ${NOCOLOR} Fin du script : DNS : ${GREEN} OK"
echo "${NOCOLOR}"

echo "${YELLOW} *** ${NOCOLOR} Lancement du script : NRPE"
echo "${NOCOLOR}"

./08-NRPE/script.sh

echo "${YELLOW} *** ${NOCOLOR} Fin du script : NRPE : ${GREEN} OK"
echo "${NOCOLOR}"