Skip to content

Instantly share code, notes, and snippets.

@JacobCallahan
Last active August 15, 2018 14:28
Show Gist options
  • Select an option

  • Save JacobCallahan/f865e29c8abb8ed79f411c7fae081dd2 to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown
Author

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

@JacobCallahan

JacobCallahan commented Jan 17, 2018

Copy link
Copy Markdown
Author

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
Copy Markdown

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

@ntkathole

Copy link
Copy Markdown

@JacobCallahan

Copy link
Copy Markdown
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