feat: ajout des scripts pour le basculement automatique
This commit is contained in:
parent
0f66a76617
commit
ee0d6fe9bb
2 changed files with 14 additions and 0 deletions
11
gerer_bot.sh
Normal file
11
gerer_bot.sh
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
ROLE=$(./verifier_role_db.sh)
|
||||
BOT_TOURNE=$(docker ps -q -f name=bot-discord)
|
||||
|
||||
if [ "$ROLE" = "primary" ] && [ -z "$BOT_TOURNE" ]; then
|
||||
docker start bot-discord
|
||||
fi
|
||||
|
||||
if [ "$ROLE" = "replica" ] && [ -n "$BOT_TOURNE" ]; then
|
||||
docker stop bot-discord
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue