cleanup older files and add archive to .gitignore
This commit is contained in:
parent
dd2177bd12
commit
bf4550ef53
1
.gitignore
vendored
1
.gitignore
vendored
@ -30,6 +30,7 @@ env/
|
|||||||
.config/
|
.config/
|
||||||
config*.yaml
|
config*.yaml
|
||||||
!config.yaml.example
|
!config.yaml.example
|
||||||
|
.archive/
|
||||||
|
|
||||||
# Logs
|
# Logs
|
||||||
*.log
|
*.log
|
||||||
|
|||||||
24
bot.sh
24
bot.sh
@ -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
|
|
||||||
Loading…
x
Reference in New Issue
Block a user