summaryrefslogtreecommitdiffstats
path: root/data/qtip_creds.sh
blob: bcd4c246eafb9816f466dd4b41476aab08b16d8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#! /bin/bash

DEST_IP=$1
echo $INSTALLER_TYPE
echo $INSTALLER_IP
sshoptions="-o StrictHostKeyChecking=no"
case "$INSTALLER_TYPE" in
    apex)
        PSWD="vagrant"
        ;;
    fuel)
        PSWD="r00tme"
        sshpass -p $PSWD scp $sshoptions ./data/QtipKey.pub root@$INSTALLER_IP:/root
        sshpass -p $PSWD scp $sshoptions ./data/QtipKey root@$INSTALLER_IP:/root
        sshpass -p $PSWD ssh $sshoptions root@$INSTALLER_IP "ssh-copy-id -i /root/QtipKey.pub root@$DEST_IP && rm -rf /root/QtipKey && rm -rf /root/QtipKey.pub"
        ;;
    compass)
        PSWD="root"
        sshpass -p $PSWD scp $sshoptions ./data/QtipKey.pub root@$INSTALLER_IP:/root
        sshpass -p $PSWD scp $sshoptions ./data/QtipKey root@$INSTALLER_IP:/root
        sshpass -p $PSWD ssh $sshoptions root@$INSTALLER_IP "ssh-copy-id -i /root/QtipKey.pub root@$DEST_IP && rm -rf /root/QtipKey && rm -rf /root/QtipKey.pub"
        ;;
    joid)
        PSWD="joid";;
       *)
        echo "Unkown installer $INSTALLER_TYPE specified";;
esac