diff options
Diffstat (limited to 'geo-replication/src/peer_add_secret_pub.in')
| -rw-r--r-- | geo-replication/src/peer_add_secret_pub.in | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/geo-replication/src/peer_add_secret_pub.in b/geo-replication/src/peer_add_secret_pub.in deleted file mode 100644 index 8bfecce9b09..00000000000 --- a/geo-replication/src/peer_add_secret_pub.in +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -if [ "$1" == "" ]; then - user="root" - home_dir=`getent passwd root | cut -d ':' -f 6`; -else - user=$1 - home_dir=`getent passwd $1 | cut -d ':' -f 6`; -fi - -if [ "$user" == "" ]; then - echo "Invalid User"; - exit 1; -fi - -if [ "$home_dir" == "" ]; then - echo "Invalid home dir"; - exit 1; -fi - -if [ ! -d $home_dir/.ssh ]; then - mkdir $home_dir/.ssh; - chmod 700 $home_dir/.ssh; - chown $user:$user $home_dir/.ssh; -fi - -if [ ! -d $home_dir/.ssh/authorized_keys ]; then - touch $home_dir/.ssh/authorized_keys; - chmod 600 $home_dir/.ssh/authorized_keys; - chown $user:$user $home_dir/.ssh/authorized_keys; -fi - -cat "$GLUSTERD_WORKING_DIR"/geo-replication/common_secret.pem.pub >> $home_dir/.ssh/authorized_keys; |
