peanutheroo

nano /etc/init.d/teamspeak

Mar 10th, 2016
268
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #! /bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides: teamspeak
  4. # Required-Start: networking
  5. # Required-Stop:
  6. # Default-Start: 2 3 4 5
  7. # Default-Stop: S 0 1 6
  8. # Short-Description: TeamSpeak Server Daemon
  9. # Description: Starts/Stops/Restarts the TeamSpeak Server Daemon
  10. ### END INIT INFO
  11.  
  12. set -e
  13.  
  14. PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
  15. DESC="TeamSpeak Server"
  16. NAME=ts3
  17. USER=ts3
  18. DIR=/home/ts3/teamspeak3-server_linux-amd64
  19. DAEMON=$DIR/ts3server_startscript.sh
  20. #PIDFILE=/var/run/$NAME.pid
  21. SCRIPTNAME=/etc/init.d/$NAME
  22.  
  23. # Gracefully exit if the package has been removed.
  24. test -x $DAEMON || exit 0
  25.  
  26. cd $DIR
  27. sudo -u ts3 ./ts3server_startscript.sh $1
RAW Paste Data