aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xshare/hydractl/puppet-finger12
1 files changed, 7 insertions, 5 deletions
diff --git a/share/hydractl/puppet-finger b/share/hydractl/puppet-finger
index 5016554..010cca1 100755
--- a/share/hydractl/puppet-finger
+++ b/share/hydractl/puppet-finger
@@ -24,15 +24,17 @@ function puppet_openssl {
# openssl x509 -text -noout -fingerprint -in /var/lib/puppetmaster/ssl/ca/signed/fqdn.pem
# openssl x509 -text -noout -fingerprint -in /var/lib/puppetmaster/ssl/certs/ca.pem
#
-if [ -d "/var/lib/puppetmaster/ssl/" ]; then
- if [ -d "/var/lib/puppetmaster/ssl/ca/signed/" ]; then
- for file in `ls /var/lib/puppetmaster/ssl/ca/signed/*pem`; do
+if [ -d "/var/lib/puppetmaster/ssl" ]; then
+ if [ -d "/var/lib/puppetmaster/ssl/ca/signed" ]; then
+ for file in `ls /var/lib/puppetmaster/ssl/ca/signed`; do
fp="`puppet_openssl $file`"
echo "`basename $file .pem`: $fp"
done
fi
- echo "ca: `puppet_openssl /var/lib/puppetmaster/ssl/certs/ca.pem`"
+ if [ -f "/var/lib/puppetmaster/ssl/certs/ca.pem" ]; then
+ echo "ca: `puppet_openssl /var/lib/puppetmaster/ssl/certs/ca.pem`"
+ fi
fi
# Node:
@@ -40,7 +42,7 @@ fi
# openssl x509 -text -noout -fingerprint -in /var/lib/puppet/ssl/certs/fqdn.pem
# openssl x509 -text -noout -fingerprint -in /var/lib/puppet/ssl/certs/ca.pem
#
-if [ -d "/var/lib/puppet/ssl/" ]; then
+if [ -d "/var/lib/puppet/ssl" ]; then
fqdn="`facter fqdn`"
fp="`puppet_openssl /var/lib/puppet/ssl/certs/$fqdn.pem`"
echo "$fqdn: $fp"