Skip to content

Commit

Permalink
Ajout du support de l'authentification Apache pour GLPI-Agent
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoninGP committed Nov 10, 2022
1 parent c34dddd commit 22b8f5c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
#Ce script permet de charger et lancer le script d' installation de l'outil d'inventaire
echo -n "adresse de téléchargement du script: "
read downloadsource
echo -n "Utilisateur pour AUTH Appache: "
read httpuser
echo -n "Mot de passe utilisateur pour AUTH Appache: "
read httppassword

#On télécharge le fichier d'installation du script
wget $downloadsource/install.sh
Expand All @@ -12,5 +16,7 @@ wget $downloadsource/main.conf

#On écrit l'adresse de téléchargement dans le fichier de configuration
sed -i "s|pathtoinstallfolder|$downloadsource|g" main.conf
sed -i "s|userforhttpauth|$httpuser|g" main.conf
sed -i "s|passwordforhttpauth|$httppassword|g" main.conf
bash install.sh
rm install.sh
5 changes: 4 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ wget $glpiagentinstallurl
perl glpi-agent-*-with-snap-linux-installer.pl
rm glpi-agent-*-with-snap-linux-installer.pl

#On rajoute les identifiants dans le fichier de configuration glpi-agent
sed -i "s|user =|user = $httpuser|g" /etc/glpi-agent/agent.cfg
sed -i "s|password =|password = $httppassword|g" /etc/glpi-agent/agent.cfg

#Installation des packets NFS Client (
#Installation des packets NFS Client
apt install -y -f nfs-common


Expand Down
4 changes: 4 additions & 0 deletions main.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ glpiagentinstallurl="https://github.com/glpi-project/glpi-agent/releases/downloa
# Nom et emplacement du répertoire contenant les fichiers logs
logpath="log"

#Configuration de GLPI Agent pour l'identification via AUTH_BASIC Appache
httpuser="userforhttpauth"
httppassword="passwordforhttpauth"

# Adresse et chemin du dossier NFS devant recevoir les fichiers logs
nfspath="127.0.0.1/path/to/logs"

Expand Down

0 comments on commit 22b8f5c

Please sign in to comment.