diff options
| -rwxr-xr-x | remote/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/remote/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr b/remote/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr index be44e87e..aaaf85d2 100755 --- a/remote/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr +++ b/remote/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr @@ -1,15 +1,16 @@ #!/bin/ash . /opt/openslx/config -DST="/opt/openslx/pvs2/pvs2.ini" # Try to get fresh version from server +CONF= if [ -n "$SLX_PVS_CONFIG_URL" ]; then - wget -T 5 -O "${DST}.new" "$SLX_PVS_CONFIG_URL" - [ -s "${DST}.new" ] && mv -f "${DST}.new" "${DST}" + DST="$(mktemp)" + wget -T 5 -O "${DST}" "$SLX_PVS_CONFIG_URL" + [ -s "${DST}" ] && CONF="--config=${DST}" fi openbox & -exec /opt/openslx/bin/pvsmgr "$@" +exec /opt/openslx/bin/pvsmgr "$CONF" "$@" |
