Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Check if a JSON file was provided
- if [ -z "$1" ]; then
- echo "Usage: $0 tokens.json"
- exit 1
- fi
- # Clear previous token file
- > data/token.txt
- # Parse tokens from the JSON file and loop through them
- index=1
- tokens=$(jq -r '.tokens[]' "$1")
- for token in $tokens; do
- echo "$token" > data/token.txt
- pm2 start bot.js --name "Dankeventsbot$index"
- index=$((index + 1))
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement