Browse Source

feat(docker): update datadir variable assignment

The code change updates the assignment of the `datadir` variable in the `linuxgsm.sh` script. The new assignment checks if the environment variable `LGSM_DATADIR` is set and uses its value, otherwise it falls back to using `${lgsmdir}/data`.
Daniel Gibbs 2 years ago
parent
commit
e4e1d72330
1 changed files with 1 additions and 1 deletions
  1. 1 1
      linuxgsm.sh

+ 1 - 1
linuxgsm.sh

@@ -33,7 +33,7 @@ steamcmddir="${HOME}/.steam/steamcmd"
 [ -n "${LGSM_SERVERFILES}" ] && serverfiles="${LGSM_SERVERFILES}" || serverfiles="${rootdir}/serverfiles"
 modulesdir="${lgsmdir}/modules"
 tmpdir="${lgsmdir}/tmp"
-datadir="${lgsmdir}/data"
+[ -n "${LGSM_DATADIR}" ] && datadir="${LGSM_DATADIR}" || datadir="${lgsmdir}/data"
 lockdir="${lgsmdir}/lock"
 sessionname="${selfname}"
 [ -f "${datadir}/${selfname}.uid" ] && socketname="${sessionname}-$(cat "${datadir}/${selfname}.uid")"