summaryrefslogtreecommitdiffstats
path: root/remote/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr
diff options
context:
space:
mode:
Diffstat (limited to 'remote/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr')
-rwxr-xr-xremote/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr8
1 files changed, 8 insertions, 0 deletions
diff --git a/remote/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr b/remote/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr
index 7a6c13d9..f58ce099 100755
--- a/remote/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr
+++ b/remote/modules/pvs2/data/opt/openslx/scripts/setup-pvsmgr
@@ -1,4 +1,12 @@
#!/bin/ash
openbox &
+
+. /opt/openslx/config
+if [ -n "$SLX_PVS_CONFIG_URL" ]; then
+ [ -z "$UID" ] && UID="$(id -u)"
+ [ -z "$HOME" ] && HOME="$(getent passwd "$UID" | head -n 1 | awk -F ':' '{print $6}')"
+ wget -O "$HOME/.config/openslx/pvs2/pvs2.ini" "$SLX_PVS_CONFIG_URL"
+fi
+
exec /opt/openslx/bin/pvsmgr --manager-only