cleanup older files and add archive to .gitignore

This commit is contained in:
cottongin 2025-02-25 04:41:20 -08:00
parent dd2177bd12
commit bf4550ef53
Signed by: cottongin
GPG Key ID: A0BD18428A296890
2 changed files with 1 additions and 24 deletions

1
.gitignore vendored
View File

@ -30,6 +30,7 @@ env/
.config/
config*.yaml
!config.yaml.example
.archive/
# Logs
*.log

24
bot.sh
View File

@ -1,24 +0,0 @@
#!/bin/bash
# Check if any arguments were provided
if [ $# -eq 0 ]; then
echo "Usage: $0 <config.yaml> [additional configs...]"
exit 1
fi
while true; do
# Remove any existing restart flags before starting
rm -f .restart_flag_*
python main.py "$@"
# Check for any restart flags
if ls .restart_flag_* 1> /dev/null 2>&1; then
echo "Restart flag(s) found, restarting bot(s)..."
sleep 1
continue
else
echo "Bot(s) exited without restart flag, stopping..."
break
fi
done