Advertisement
iaretechnician

ShareX

Oct 17th, 2015
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.54 KB | None | 0 0
  1.  
  2. #!/bin/bash
  3. # ARMA 3
  4. # Server Management Script
  5. # Author: Daniel Gibbs
  6. # Contributor: Scarsz
  7. # Website: http://gameservermanagers.com
  8. version="040715"
  9.  
  10. #### Variables ####
  11.  
  12. # Notification Email
  13. # (on|off)
  14. emailnotification="off"
  15. email="email@example.com"
  16.  
  17. # Steam login
  18. steamuser="username"
  19. steampass="password"
  20.  
  21. # Start Variables
  22. ip="0.0.0.0"
  23. updateonstart="off"
  24.  
  25. fn_parms(){
  26. parms="-netlog -ip=${ip} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod=${mods}"
  27. }
  28.  
  29. # ARMA 3 Modules
  30. # add mods with relative paths:
  31. # mods/\@CBA_A3\;
  32. # or several mods as:
  33. # mods/\@CBA_A3\;mods/\@task_force_radio
  34. # and chmod modules directories to 775
  35. mods=""
  36.  
  37. #### Advanced Variables ####
  38.  
  39. # Steam
  40. # Stable
  41. appid="233780"
  42. # Development
  43. # appid="233780 -beta development"
  44.  
  45. # Server Details
  46. servicename="arma3-server"
  47. gamename="ARMA 3"
  48. engine="realvirtuality"
  49.  
  50. # Directories
  51. rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
  52. selfname="$(basename $0)"
  53. lockselfname=".${servicename}.lock"
  54. filesdir="${rootdir}/serverfiles"
  55. systemdir="${filesdir}"
  56. executabledir="${filesdir}"
  57. executable="./arma3server"
  58. servercfg="${servicename}.server.cfg"
  59. networkcfg="${servicename}.network.cfg"
  60. servercfgdir="${systemdir}/cfg"
  61. servercfgfullpath="${servercfgdir}/${servercfg}"
  62. networkcfgfullpath="${servercfgdir}/${networkcfg}"
  63. servercfgdefault="${servercfgdir}/lgsm-default.server.cfg"
  64. networkcfgdefault="${servercfgdir}/lgsm-default.network.cfg"
  65. backupdir="${rootdir}/backups"
  66.  
  67. # Logging
  68. logdays="7"
  69. #gamelogdir="" # No server logs available
  70. scriptlogdir="${rootdir}/log/script"
  71. consolelogdir="${rootdir}/log/console"
  72.  
  73. scriptlog="${scriptlogdir}/${servicename}-script.log"
  74. consolelog="${consolelogdir}/${servicename}-console.log"
  75. emaillog="${scriptlogdir}/${servicename}-email.log"
  76.  
  77. scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log"
  78. consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log"
  79.  
  80. ##### Script #####
  81. # Do not edit
  82.  
  83. fn_runfunction(){
  84. # Functions are downloaded and run with this function
  85. if [ ! -f "${rootdir}/functions/${functionfile}" ]; then
  86. cd "${rootdir}"
  87. if [ ! -d "functions" ]; then
  88. mkdir functions
  89. fi
  90. cd functions
  91. echo -e " loading ${functionfile}...\c"
  92. wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45-
  93. chmod +x "${functionfile}"
  94. cd "${rootdir}"
  95. fi
  96. source "${rootdir}/functions/${functionfile}"
  97. }
  98.  
  99. fn_functions(){
  100. # Functions are defined in fn_functions.
  101. functionfile="${FUNCNAME}"
  102. fn_runfunction
  103. }
  104.  
  105. fn_functions
  106.  
  107. getopt=$1
  108. fn_getopt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement