TruesAutoBlacklister / restart_script.sh
Ufoptg's picture
Create restart_script.sh
2939995 verified
raw
history blame
No virus
321 Bytes
#!/bin/bash
# Generate a random sleep time between 20 and 40 hours (in seconds)
sleep_time=$(( (RANDOM % 144000) + 72000 ))
# Sleep for the generated time
sleep $sleep_time
# Restart the application
pkill -f 'python3 server.py'
pkill -f 'python3 code.py'
# Execute the CMD again to restart the application
exec "$@"