diff options
Diffstat (limited to 'remote/modules/pvs2/data/opt/openslx/scripts/systemd-pvsmgr')
-rwxr-xr-x | remote/modules/pvs2/data/opt/openslx/scripts/systemd-pvsmgr | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/remote/modules/pvs2/data/opt/openslx/scripts/systemd-pvsmgr b/remote/modules/pvs2/data/opt/openslx/scripts/systemd-pvsmgr new file mode 100755 index 00000000..1a56e8d0 --- /dev/null +++ b/remote/modules/pvs2/data/opt/openslx/scripts/systemd-pvsmgr @@ -0,0 +1,22 @@ +#!/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 10 -O "${DST}.new" "$SLX_PVS_CONFIG_URL" + [ -s "${DST}.new" ] && mv -f "${DST}.new" "${DST}" +fi + +# 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 + cp -f "/usr/share/xsessions/pvs2mgr.desktop" "$file" + done + # patch autologin into kdmrc + sed -i '/AutoLogin.*=/d;/^\[X-.*-Core\]/a AutoLoginEnable=true\nAutoLoginUser=demo\nAutoLoginAgain=true\nAutoLoginDelay=0' "/etc/kde/kdm/kdmrc" +fi + +exit 0 + |