Advertisement
SoulofSorrow

Ts3 Autostart+Accounting

Jul 27th, 2015
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.96 KB | None | 0 0
  1. nano /etc/init.d/teamspeak3
  2.  
  3.  
  4. #!/bin/sh
  5. ### BEGIN INIT INFO
  6. # Provides:         teamspeak3
  7. # Required-Start:   $local_fs $network
  8. # Required-Stop:    $local_fs $network
  9. # Default-Start:    2 3 4 5
  10. # Default-Stop:     0 1 6
  11. # Short-Description:
  12. # Description:      Teamspeak 3 Server
  13. ### END INIT INFO
  14.  
  15.  
  16. ######################################
  17. # Customize values for your needs: "User"; "DIR"
  18.  
  19. USER="teamspeak3"
  20. DIR="/home/teamspeak/"
  21.  
  22. ###### Teamspeak 3 server start/stop script ######
  23.  
  24. case "$1" in
  25. start)
  26. su $USER -c "${DIR}./AccountingServerEmulator"
  27. su $USER -c "${DIR}./ts3server_startscript.sh start"
  28. ;;
  29. stop)
  30. su $USER -c "${DIR}./ts3server_startscript.sh stop"
  31. su $USER -c "${DIR}./AccountingServerEmulator stop"
  32. ;;
  33. status)
  34. su $USER -c "${DIR}./ts3server_startscript.sh status"
  35. ;;
  36. *)
  37. echo "Usage: {start|stop|status}" >&2
  38. exit 1
  39. ;;
  40. esac
  41. exit 0
  42.  
  43.  
  44. chmod 755 /etc/init.d/teamspeak3
  45.  
  46. update-rc.d teamspeak3 defaults
  47.  
  48. /etc/init.d/teamspeak3 start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement