Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/sh -x
- cd
- start_game () {
- case "${1}" in
- 'unvanquished'|'unvtrem'|'unvmaster')
- sudo -H -u unvanquished ~/startded "${1}"
- ;;
- 'gesource')
- sudo -H -u gesource ~/startded "${1}"
- ;;
- 'pdsource')
- sudo -H -u pdsource ~/startded "${1}"
- ;;
- 'etlegacy'|'cqbtest'|'tcetestobj'|'tcetestbc')
- sudo -H -u etlegacy ~/startded "${1}"
- ;;
- 'xonotic'|'xonduel')
- sudo -H -u xonotic ~/startded "${1}"
- ;;
- 'smokinguns')
- sudo -H -u smokinguns ~/startded "${1}"
- ;;
- 'chatbridge')
- sudo -H -u chatbridge ~/startded "${1}"
- ;;
- *)
- ;;
- esac
- }
- parse () {
- keyword="$(echo "${1}" | cut -f1 -d' ')"
- game="$(echo "${1}" | cut -f2 -d' ')"
- case "${keyword}" in
- 'start')
- start_game "${game}"
- ;;
- *)
- ;;
- esac
- }
- main () {
- while true
- do
- netcat -l -p 2828 | while read line
- do
- parse "${line}"
- done
- done
- }
- touch -a ~/dedmgr.log
- main | tee -a ~/dedmgr.log
- #EOF
Add Comment
Please, Sign In to add comment