From 58ff53e00b650a35c9f4ebd54c338edf0988349c Mon Sep 17 00:00:00 2001 From: DiouxX Date: Fri, 28 Dec 2018 10:19:45 +0100 Subject: [PATCH] Add SNMP package --- Dockerfile | 3 ++- glpi-start.sh | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 96383d9..0bd2e29 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,8 @@ php-apcu-bc \ php-cas \ cron \ wget \ -jq +jq \ +snmpd #Copie et execution du script pour l'installation et l'initialisation de GLPI COPY glpi-start.sh /opt/ diff --git a/glpi-start.sh b/glpi-start.sh index 2cab106..2a74219 100644 --- a/glpi-start.sh +++ b/glpi-start.sh @@ -34,13 +34,25 @@ fi #Modification du vhost par défaut echo -e "\n\tDocumentRoot /var/www/html/glpi\n\n\t\n\t\tAllowOverride All\n\t\tOrder Allow,Deny\n\t\tAllow from all\n\t\n\n\tErrorLog /var/log/apache2/error-glpi.log\n\tLogLevel warn\n\tCustomLog /var/log/apache2/access-glpi.log combined\n" > /etc/apache2/sites-available/000-default.conf +#Activation du module rewrite d'apache +a2enmod rewrite && service apache2 restart && service apache2 stop + +###################### +# CRON CONFIGURATION # +###################### #Add scheduled task by cron and enable echo "*/2 * * * * www-data /usr/bin/php /var/www/html/glpi/front/cron.php &>/dev/null" >> /etc/cron.d/glpi + #Start cron service service cron start -#Activation du module rewrite d'apache -a2enmod rewrite && service apache2 restart && service apache2 stop +###################### +# SNMP CONFIGURATION # +###################### +#Replace Listen localhot SNMP and restart service +sed -ie "s/agentAddress udp:127.0.0.1:161/agentAdrress udp:161/g" /etc/snmp/snmpd.conf + +service snmpd restart #Lancement du service apache au premier plan /usr/sbin/apache2ctl -D FOREGROUND