4
0

core_legacy.sh 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #!/bin/bash
  2. # LinuxGSM core_legacy.sh function
  3. # Author: Daniel Gibbs
  4. # Website: https://linuxgsm.com
  5. # Description: Code for backwards compatability with older versions of LinuxGSM.
  6. if [ -z "${serverfiles}" ]; then
  7. legacymode=1
  8. serverfiles="${filesdir}"
  9. fi
  10. if [ -z "${logdir}" ]; then
  11. logdir="${rootdir}/log"
  12. fi
  13. if [ -z "${lgsmlogdir}" ]; then
  14. lgsmlogdir="${scriptlogdir}"
  15. fi
  16. if [ -z "${lgsmlog}" ]; then
  17. lgsmlog="${scriptlog}"
  18. fi
  19. if [ -z "${lgsmlogdate}" ]; then
  20. lgsmlogdate="${scriptlogdate}"
  21. fi
  22. if [ -z "${steamcmddir}" ]; then
  23. steamcmddir="${rootdir}/steamcmd"
  24. fi
  25. if [ -z "${lgsmdir}" ]; then
  26. lgsmdir="${rootdir}/lgsm"
  27. fi
  28. if [ -z "${tmpdir}" ]; then
  29. tmpdir="${lgsmdir}/tmp"
  30. fi
  31. if [ -z "${alertlog}" ]; then
  32. alertlog="${emaillog}"
  33. fi
  34. if [ -z "${servicename}" ]; then
  35. servicename="${selfname}"
  36. fi
  37. # Alternations to workshop variables.
  38. if [ -z "${wsapikey}" ]; then
  39. if [ "${workshopauth}" ]; then
  40. wsapikey="${workshopauth}"
  41. elif [ "${authkey}" ]; then
  42. wsapikey="${authkey}"
  43. fi
  44. fi
  45. if [ -z "${wscollectionid}" ]; then
  46. if [ "${workshopauth}" ]; then
  47. wscollectionid="${ws_collection_id}"
  48. elif [ "${authkey}" ]; then
  49. wscollectionid="${workshopcollectionid}"
  50. fi
  51. fi
  52. if [ -z "${wsstartmap}" ]; then
  53. if [ "${ws_start_map}" ]; then
  54. wscollectionid="${ws_start_map}"
  55. fi
  56. fi