a simple vsys script to mount .ssh directory out-of-band
Barış Metin [Thu, 24 Jun 2010 09:25:03 +0000 (11:25 +0200)]
omf_keys/keymount [new file with mode: 0644]

diff --git a/omf_keys/keymount b/omf_keys/keymount
new file mode 100644 (file)
index 0000000..84cb2f3
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+SRC="/home/$1/.ssh/"
+DEST="/vservers/$1/dot_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
+