summaryrefslogtreecommitdiffstats
path: root/core/modules/printergui/data/opt/openslx/scripts/systemd-printergui_preparation
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/printergui/data/opt/openslx/scripts/systemd-printergui_preparation')
-rwxr-xr-xcore/modules/printergui/data/opt/openslx/scripts/systemd-printergui_preparation20
1 files changed, 20 insertions, 0 deletions
diff --git a/core/modules/printergui/data/opt/openslx/scripts/systemd-printergui_preparation b/core/modules/printergui/data/opt/openslx/scripts/systemd-printergui_preparation
new file mode 100755
index 00000000..33a861e6
--- /dev/null
+++ b/core/modules/printergui/data/opt/openslx/scripts/systemd-printergui_preparation
@@ -0,0 +1,20 @@
+#!/bin/ash
+
+ERR=0
+SRCDIR=/usr/lib/cups/backend
+DESTDIR=/opt/openslx/cups/backend
+PRINTPWGUI=/opt/openslx/cups/printpwgui
+
+if [ ! -d "$DESTDIR" ]; then
+ mkdir -p "$DESTDIR" || exit 1
+fi
+
+mv "$SRCDIR"/* "$DESTDIR"
+
+cd "$SRCDIR"
+for i in "$DESTDIR"/*; do
+ ln -sf "$PRINTPWGUI" $(basename "$i")
+done
+
+exit 0
+