diff options
| author | Simon Rettberg | 2016-10-10 19:37:42 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2016-10-10 19:37:42 +0200 |
| commit | 786df0669f73375d4bf5703c422e910839b7717f (patch) | |
| tree | a8a9340b5ffe652a401218eca37e417d2ac6827f /remote/modules/pvs2/data/opt/openslx/scripts | |
| parent | [run-virt/udhcpc] Fix passing on domain suffix and search domains to VMs via ... (diff) | |
| download | tm-scripts-786df0669f73375d4bf5703c422e910839b7717f.tar.gz tm-scripts-786df0669f73375d4bf5703c422e910839b7717f.tar.xz tm-scripts-786df0669f73375d4bf5703c422e910839b7717f.zip | |
[pvs2] Use command line option for config file location; use new client side exam mode config
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 |
