Advertisement
Guest User

Untitled

a guest
Jun 9th, 2016
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.96 KB | None | 0 0
  1. #!/bin/bash
  2. #
  3. # chkconfig: 35 90 12
  4. # description: Omniwar server
  5. #
  6. # Get function from functions library
  7. . /etc/init.d/functions
  8. # Start the service Omniwar
  9. start() {
  10.         echo -n "Starting Omniwar server:"
  11.         ~/LinuxServer/FPSGame/Binaries/Linux/FPSGameServer-Linux-DebugGame &
  12.         ### Create the lock file ###
  13.         touch /var/lock/subsys/Omniwar
  14.         success $"Omniwar server startup"
  15.         echo
  16. }
  17. # Restart the service Omniawr
  18. stop() {
  19.         echo -n "Stopping Omniwar server:"
  20.         killproc FPSGameServer-Linux-DebugGame
  21.         ### Now, delete the lock file ###
  22.         rm -f /var/lock/subsys/Omniwar
  23.         echo
  24. }
  25. ### main logic ###
  26. case "$1" in
  27.   start)
  28.         start
  29.         ;;
  30.   stop)
  31.         stop
  32.         ;;
  33.   status)
  34.         status FPSGameServer-Linux-DebugGame
  35.         ;;
  36.   restart)
  37.         stop
  38.         start
  39.         ;;
  40.   *)
  41.         echo $"Usage: $0 {start|stop|restart|status}"
  42.         exit 1
  43. esac
  44. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement