summaryrefslogtreecommitdiff
path: root/gemfeed/examples/conf/frontends/scripts/dserver-update-key-cache.sh.tpl
diff options
context:
space:
mode:
Diffstat (limited to 'gemfeed/examples/conf/frontends/scripts/dserver-update-key-cache.sh.tpl')
-rw-r--r--gemfeed/examples/conf/frontends/scripts/dserver-update-key-cache.sh.tpl34
1 files changed, 0 insertions, 34 deletions
diff --git a/gemfeed/examples/conf/frontends/scripts/dserver-update-key-cache.sh.tpl b/gemfeed/examples/conf/frontends/scripts/dserver-update-key-cache.sh.tpl
deleted file mode 100644
index 86b5ecf9..00000000
--- a/gemfeed/examples/conf/frontends/scripts/dserver-update-key-cache.sh.tpl
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/ksh
-
-CACHEDIR=/var/run/dserver/cache
-DSERVER_USER=_dserver
-DSERVER_GROUP=_dserver
-
-echo 'Updating SSH key cache'
-
-ls /home/ | while read remoteuser; do
- keysfile=/home/$remoteuser/.ssh/authorized_keys
-
- if [ -f $keysfile ]; then
- cachefile=$CACHEDIR/$remoteuser.authorized_keys
- echo "Caching $keysfile -> $cachefile"
-
- cp $keysfile $cachefile
- chown $DSERVER_USER:$DSERVER_GROUP $cachefile
- chmod 600 $cachefile
- fi
-done
-
-# Cleanup obsolete public SSH keys
-find $CACHEDIR -name \*.authorized_keys -type f |
-while read cachefile; do
- remoteuser=$(basename $cachefile | cut -d. -f1)
- keysfile=/home/$remoteuser/.ssh/authorized_keys
-
- if [ ! -f $keysfile ]; then
- echo 'Deleting obsolete cache file $cachefile'
- rm $cachefile
- fi
-done
-
-echo 'All set...'