SoulofSorrow

TS3 Accounting Crashrestart Script

Feb 8th, 2016
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.35 KB | None | 0 0
  1. #! /bin/bash
  2. case "$(pidof AccountingServerEmulator | wc -w)" in
  3. 0) echo "Restarting AccountingServer: $(date)" >> /home/teamspeak/auto_log.txt
  4. /home/teamspeak/AccountingServerEmulator &
  5. ;;
  6. 1) # all ok
  7. ;;
  8. *) echo "Removed double AccountingServer: $(date)" >> /home/teamspeak/auto_log.txt
  9. kill $(pidof AccountingServerEmulator | awk '{print $1}')
  10. ;;
  11. esac
Advertisement
Add Comment
Please, Sign In to add comment