This commit is contained in:
2022-09-17 21:53:29 +01:00
parent 24a85b0b97
commit c3a65a8c90

View File

@ -5,43 +5,44 @@ set -e
#
check_keystore () {
if [ ! -d ${KEYSTORE} ]
then
if [ ! -d ${KEYSTORE} ]
then
mkdir -p ${KEYSTORE}
fi
fi
}
check_bastionkey () {
if [ ! -f ${BASTIONKEY} ]
then
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
fi
}
check_gitkey () {
if [ ! -f ${GITKEY} ]
then
if [ ! -f ${GITKEY} ]
then
ssh-keygen -o -a 100 -t ed25519 -f ${GITKEY} -N "" -C git@${NAME}
fi
fi
}
check_rsynckey () {
if [ ! -f ${RSYNCKEY} ]
then
if [ ! -f ${RSYNCKEY} ]
then
ssh-keygen -o -a 100 -t ed25519 -f ${RSYNCKEY} -N "" -C rsync@${NAME}
cp -p ${RSYNCKEY}.pub ${KEYSTORE}/_r${NAME}.pub
fi
fi
}
check_vibblerkey () {
if [ ! -f ${VIBBLERKEY} ]
then
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
fi
}
check_key () {