mirror of
https://github.com/skylanix/MamieHenriette.git
synced 2026-02-15 20:40:39 +01:00
Refactorer Docker et mettre à jour README
This commit is contained in:
19
start.sh
19
start.sh
@@ -1,21 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Script de démarrage conditionnel pour Zabbix et le bot Discord
|
||||
|
||||
# Vérifier si Zabbix est activé
|
||||
if [ "$ENABLE_ZABBIX" = "true" ]; then
|
||||
echo "Zabbix activé - Configuration de l'agent..."
|
||||
|
||||
# Remplacer les variables dans la config Zabbix
|
||||
sed -i "s/Server=.*/Server=$ZABBIX_SERVER/" /etc/zabbix/zabbix_agent2.conf
|
||||
sed -i "s/ServerActive=.*/ServerActive=$ZABBIX_SERVER:10051/" /etc/zabbix/zabbix_agent2.conf
|
||||
sed -i "s/Hostname=.*/Hostname=$ZABBIX_HOSTNAME/" /etc/zabbix/zabbix_agent2.conf
|
||||
|
||||
zabbix_agent2 -f &
|
||||
echo "Zabbix Agent démarré"
|
||||
else
|
||||
echo "Zabbix désactivé"
|
||||
fi
|
||||
|
||||
echo "Démarrage du bot Discord..."
|
||||
exec /app/venv/bin/python run-web.py
|
||||
exec /app/venv/bin/python run-web.py 2>&1 | rotatelogs /app/logs/app.log.%Y%m%d-%H%M%S 50M
|
||||
Reference in New Issue
Block a user