.
This commit is contained in:
52
bin/cPull2
52
bin/cPull2
@ -67,21 +67,46 @@ check_keystore () {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check_bastionkey () {
|
||||||
|
if [ ! -f ${BASTIONKEY} ]
|
||||||
|
then
|
||||||
|
ssh-keygen -o -a 100 -t ed25519 -f ${BASTIONKEY} -N "" -C bastion@${NAME}
|
||||||
|
cp -p ${BASTIONKEY}.pub ${KEYSTORE}/_b${NAME}.pub
|
||||||
|
cp -p ${BASTIONKEY}.pub ${KEYSTORE}/_d${NAME}.pub
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
check_gitkey () {
|
check_gitkey () {
|
||||||
if [ ! -f ${GITKEY} ]
|
if [ ! -f ${GITKEY} ]
|
||||||
then
|
then
|
||||||
ssh-keygen -o -a 100 -t ed25519 -f ${GITKEY} -N "" -C git@${MYNAME}
|
ssh-keygen -o -a 100 -t ed25519 -f ${GITKEY} -N "" -C git@${NAME}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
check_rsynckey () {
|
check_rsynckey () {
|
||||||
if [ ! -f ${RSYNCKEY} ]
|
if [ ! -f ${RSYNCKEY} ]
|
||||||
then
|
then
|
||||||
ssh-keygen -o -a 100 -t ed25519 -f ${RSYNCKEY} -N "" -C rsync@${MYNAME}
|
ssh-keygen -o -a 100 -t ed25519 -f ${RSYNCKEY} -N "" -C rsync@${NAME}
|
||||||
cp -p ${RSYNCKEY}.pub ${KEYSTORE}/_r${MYNAME}.pub
|
cp -p ${RSYNCKEY}.pub ${KEYSTORE}/_r${NAME}.pub
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check_vibblerkey () {
|
||||||
|
if [ ! -f ${VIBBLERKEY} ]
|
||||||
|
then
|
||||||
|
ssh-keygen -o -a 100 -t ed25519 -f ${VIBBLERKEY} -N "" -C vibbler@${NAME}
|
||||||
|
cp -p ${VIBBLERKEY}.pub ${KEYSTORE}/_v${NAME}.pub
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
check_key () {
|
||||||
|
if [ ! -f ${KEYSTORE}/${KEYNAME} ]
|
||||||
|
then
|
||||||
|
ssh-keygen -o -a 100 -t ed25519 -f ${KEYSTORE}/${KEYNAME} -N "" -C ${KEYNAME}@${MACHINENAME}
|
||||||
|
fi
|
||||||
|
cp -p ${KEYSTORE}/${KEYNAME}.pub ${KEYSTORE}/${KEYNAME_SHORT}${MACHINENAME}.pub
|
||||||
|
}
|
||||||
|
|
||||||
##
|
##
|
||||||
##
|
##
|
||||||
##
|
##
|
||||||
@ -242,12 +267,25 @@ RSYNCKEY=${KEYSTORE}/rsync
|
|||||||
BASTIONKEY=${KEYSTORE}/bastion
|
BASTIONKEY=${KEYSTORE}/bastion
|
||||||
STATIC=/static
|
STATIC=/static
|
||||||
|
|
||||||
|
|
||||||
set_constants
|
set_constants
|
||||||
check_rsync
|
|
||||||
|
NAME=$(uname -n|cut -c2-4)
|
||||||
|
LAST=$(uname -n| sed -e 's/.*\(.$\)/\1/')
|
||||||
|
NAME=$(uname -n)
|
||||||
|
LAST=$(uname -n)
|
||||||
|
|
||||||
check_keystore
|
check_keystore
|
||||||
check_gitkey
|
|
||||||
check_rsynckey
|
|
||||||
check_lock
|
KEYNAME=rsync
|
||||||
|
KEYNAME_SHORT=${PREFIX}$(echo $KEYNAME|cut -c1-2)${ID}
|
||||||
|
check_key
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#####
|
#####
|
||||||
# custom code
|
# custom code
|
||||||
|
|||||||
Reference in New Issue
Block a user