diff options
Diffstat (limited to 'remote/modules/pvs2/data/opt/openslx/scripts')
| -rwxr-xr-x | remote/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr | 9 | ||||
| -rwxr-xr-x | remote/modules/pvs2/data/opt/openslx/scripts/systemd-pvsmgr | 10 |
2 files changed, 10 insertions, 9 deletions
diff --git a/remote/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr b/remote/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr index f39e03aa..be44e87e 100755 --- a/remote/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr +++ b/remote/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr @@ -1,5 +1,14 @@ #!/bin/ash +. /opt/openslx/config +DST="/opt/openslx/pvs2/pvs2.ini" + +# Try to get fresh version from server +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}" +fi + openbox & exec /opt/openslx/bin/pvsmgr "$@" diff --git a/remote/modules/pvs2/data/opt/openslx/scripts/systemd-pvsmgr b/remote/modules/pvs2/data/opt/openslx/scripts/systemd-pvsmgr index 34ae61d5..1a56e8d0 100755 --- a/remote/modules/pvs2/data/opt/openslx/scripts/systemd-pvsmgr +++ b/remote/modules/pvs2/data/opt/openslx/scripts/systemd-pvsmgr @@ -5,18 +5,10 @@ DST="/opt/openslx/pvs2/pvs2.ini" # Try to get fresh version from server if [ -n "$SLX_PVS_CONFIG_URL" ]; then - wget -O "${DST}.new" "$SLX_PVS_CONFIG_URL" + wget -T 10 -O "${DST}.new" "$SLX_PVS_CONFIG_URL" [ -s "${DST}.new" ] && mv -f "${DST}.new" "${DST}" fi -# Patch exam mode according to what our fetched config says -if [ -n "$SLX_EXAM" ]; then - EMODE=True -else - EMODE=False -fi -sed -i "/^examMode/d;/^\\[General\\]/a examMode=$EMODE" "$DST" - # If this is a dedicated PVS station, make it launch right away if [ -n "$SLX_PVS_DEDICATED" ] && cd /opt/openslx/xsessions; then for file in *.desktop; do |
