core_legacy.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. # Alternations to workshop variables
  35. if [ -z "${wsapikey}" ]; then
  36. if [ "${workshopauth}" ]; then
  37. wsapikey="${workshopauth}"
  38. elif [ "${authkey}" ]; then
  39. wsapikey="${authkey}"
  40. fi
  41. fi
  42. if [ -z "${wscollectionid}" ]; then
  43. if [ "${workshopauth}" ]; then
  44. wscollectionid="${ws_collection_id}"
  45. elif [ "${authkey}" ]; then
  46. wscollectionid="${workshopcollectionid}"
  47. fi
  48. fi
  49. if [ -z "${wsstartmap}" ]; then
  50. if [ "${ws_start_map}" ]; then
  51. wscollectionid="${ws_start_map}"
  52. fi
  53. fi