Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- PID=`pgrep -u $USER authserver`
- if [ -n "$PID" ]; then
- echo "Interrupting authserver then waiting 4 seconds."
- kill -INT `pgrep -u $USER authserver`
- sleep 4
- PID=`pgrep -u $USER authserver`
- if [ -n "$PID" ]; then
- echo "Killing authserver - it didn't shut down properly."
- kill -KILL `pgrep -u $USER authserver`
- sleep 1
- fi
- else
- echo "authserver was not found running."
- fi
- PID=`pgrep -u $USER bnetserver`
- if [ -n "$PID" ]; then
- echo "Interrupting bnetserver then waiting 4 seconds."
- kill -INT `pgrep -u $USER bnetserver`
- sleep 4
- PID=`pgrep -u $USER bnetserver`
- if [ -n "$PID" ]; then
- echo "Killing bnetserver - it didn't shut down properly."
- kill -KILL `pgrep -u $USER bnetserver`
- sleep 1
- fi
- else
- echo "bnetserver was not found running."
- fi
- PID=`pgrep -u $USER worldserver`
- if [ -n "$PID" ]; then
- echo "Interrupting worldserver, then waiting 10 seconds."
- kill -INT `pgrep -u $USER worldserver`
- sleep 10
- PID=`pgrep -u $USER worldserver`
- if [ -n "$PID" ]; then
- echo "Killing worldserver in case it didn't shut down."
- kill -KILL `pgrep -u $USER worldserver`
- sleep 1
- fi
- else
- echo "worldserver was not found running."
- fi
Advertisement
Add Comment
Please, Sign In to add comment