Advertisement
iaretechnician

ShareX

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