Add usage to script
This commit is contained in:
parent
41b00d960d
commit
3f9d085a96
@ -69,3 +69,20 @@ revoke_cert() {
|
|||||||
view_crl() {
|
view_crl() {
|
||||||
openssl crl -in crl/intermediate.crl.pem -noout -text
|
openssl crl -in crl/intermediate.crl.pem -noout -text
|
||||||
}
|
}
|
||||||
|
|
||||||
|
operation=$1
|
||||||
|
case $operation in
|
||||||
|
cert) create_cert "$@" ;;
|
||||||
|
crl) view_crl ;;
|
||||||
|
revoke) revoke_cert "$@" ;;
|
||||||
|
init) create_ca "$@" ;;
|
||||||
|
|
||||||
|
'')
|
||||||
|
printf 'usage: cactl <operation>\n'
|
||||||
|
printf 'operations:\n'
|
||||||
|
printf ' cactl cert <domain> Create a new certificate\n'
|
||||||
|
printf ' cactl crl View revoked certificates\n'
|
||||||
|
printf ' cactl revoke <domain> Revoke a certificate\n'
|
||||||
|
printf ' cactl init Initialise a new CA\n'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
Loading…
x
Reference in New Issue
Block a user