Browse Source

tmpdir

pull/1065/head
Daniel Gibbs 9 years ago
parent
commit
0f39f6a357
  1. 1
      ProjectZomboid/pzserver
  2. 5
      lgsm/functions/command_postdetails.sh

1
ProjectZomboid/pzserver

@ -66,6 +66,7 @@ lockselfname=".${servicename}.lock"
lgsmdir="${rootdir}/lgsm"
functionsdir="${lgsmdir}/functions"
libdir="${lgsmdir}/lib"
tmpdir="${lgsmdir}/tmp"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}"
executabledir="${filesdir}"

5
lgsm/functions/command_postdetails.sh

@ -53,13 +53,12 @@ fn_bad_tmpfile() {
}
# Rather than a one-pass sed parser, default to using a temporary directory
posttmpdir="${tmpdir}"
# Not all game servers possess a tmp directory. So create it if
# it doesn't already exist
mkdir -p "${posttmpdir}" 2>&1 >/dev/null
mkdir -p "${tmpdir}" 2>&1 >/dev/null
tmpfile="${posttmpdir}/postdetails-$(date +"%Y-%d-%m_%H-%M-%S").tmp"
tmpfile="${tmpdir}/postdetails-$(date +"%Y-%d-%m_%H-%M-%S").tmp"
touch "${tmpfile}" || fn_bad_tmpfile

Loading…
Cancel
Save