Add usage to script
This commit is contained in:
		@@ -69,3 +69,20 @@ revoke_cert() {
 | 
			
		||||
view_crl() {
 | 
			
		||||
  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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user