Skip to content

Instantly share code, notes, and snippets.

@JacobCallahan
Last active August 15, 2018 14:28
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save JacobCallahan/f865e29c8abb8ed79f411c7fae081dd2 to your computer and use it in GitHub Desktop.
Save JacobCallahan/f865e29c8abb8ed79f411c7fae081dd2 to your computer and use it in GitHub Desktop.
Satellite certificate generator script
#! /bin/bash
if [ -n "$1" ]; then
name=$1
else
name=$(hostname)
fi
git clone https://github.com/iNecas/ownca.git
cd ownca
yes "" | ./generate-ca.sh
yes | ./generate-crt.sh $name
certdir="$(pwd)/$name/"
cp cacert.crt $name/
cd $name
katello-certs-check -c "$name.crt" -k "$name.key" -r "$name.crt.req" -b cacert.crt
@JacobCallahan
Copy link
Author

you will only need to type in the pass phrase 3 times.

@JacobCallahan
Copy link
Author

JacobCallahan commented Jan 17, 2018

now you can run the script with a desired hostname. if you don't pass one, it will default to your current.
@mccun934 fyi ^

@ntkathole
Copy link

-r option is no longer with katello-certs-check

@ntkathole
Copy link

@JacobCallahan
Copy link
Author

I'll keep this script as-is for now, to maintain 6.3 and below compatibility. thanks for the heads up, though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment