2017-09-20 18:18:24 +00:00
|
|
|
#!/usr/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
FQDN=`hostname`
|
2017-09-21 15:41:20 +00:00
|
|
|
|
|
|
|
if test -f /etc/pki/tls/certs/localhost.crt -o \
|
2017-09-21 18:55:16 +00:00
|
|
|
-f /etc/pki/tls/private/localhost.key; then
|
2017-09-21 15:41:20 +00:00
|
|
|
exit 1
|
2017-09-20 18:18:24 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
sscg -q \
|
|
|
|
--cert-file /etc/pki/tls/certs/localhost.crt \
|
|
|
|
--cert-key-file /etc/pki/tls/private/localhost.key \
|
2017-09-21 18:55:16 +00:00
|
|
|
--ca-file /etc/pki/tls/certs/localhost.crt \
|
2017-09-20 18:18:24 +00:00
|
|
|
--lifetime 365 \
|
|
|
|
--hostname $FQDN \
|
|
|
|
--email root@$FQDN
|
2017-09-21 15:41:20 +00:00
|
|
|
|