+9
-8
@@ -24,11 +24,12 @@ mkdir -p elog_instance/logbooks
|
||||
# Générer le fichier mot de passe
|
||||
htpasswd -cb elog_instance/elog.passwd robot testpassword
|
||||
|
||||
# Configuration avec accès restreint
|
||||
# Configuration avec accès complet
|
||||
cat > elog_instance/elogd.cfg <<EOF
|
||||
[global]
|
||||
port = 8080
|
||||
logdir = logbooks
|
||||
allowed methods = GET, POST, PUT, DELETE
|
||||
allowposting = 1
|
||||
allowhtml = 1
|
||||
|
||||
@@ -36,17 +37,17 @@ allowhtml = 1
|
||||
dir = logbooks/demo
|
||||
allow = robot
|
||||
passwdfile = elog.passwd
|
||||
allowedit = robot
|
||||
edit password = testpassword
|
||||
allowedit = 1
|
||||
EOF
|
||||
|
||||
# Lancer le serveur
|
||||
~/.local/bin/elogd -c elog_instance/elogd.cfg &
|
||||
sleep 3
|
||||
|
||||
# Vérification
|
||||
echo "✅ elogd version:"
|
||||
~/.local/bin/elogd -h | head -n 1
|
||||
# Test PUT
|
||||
echo "🔄 Test de requête PUT..."
|
||||
curl -X PUT -u robot:testpassword -d "subject=Test&message=Ceci+est+un+test" http://localhost:8080/demo/
|
||||
|
||||
echo "📬 Accès test au logbook :"
|
||||
curl http://localhost:8080/demo/ || echo "Pas encore de logbook 'demo'"
|
||||
|
||||
echo "✅ ELOG setup terminé"
|
||||
echo "✅ ELOG setup terminé"
|
||||
Reference in New Issue
Block a user