new layout - make room for slice-space stuff
[vsys-scripts.git] / root-context / exec / dotsshmount
diff --git a/root-context/exec/dotsshmount b/root-context/exec/dotsshmount
new file mode 100755 (executable)
index 0000000..70c4e19
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+SRC="/home/$1/.ssh"
+DEST="/vservers/$1/home/$1/.ssh"
+
+mkdir -p $DEST &> /dev/null
+
+mount | grep "on $DEST type" > /dev/null
+if [ $? -ne 0 ]; then
+   /bin/mount --bind -o ro $SRC $DEST > /dev/null
+fi
+