You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
549 B

  1. #!/bin/bash
  2. #Here is a script to deploy cert to grafana server.
  3. #returns 0 means success, otherwise error.
  4. ######## Public functions #####################
  5. #domain keyfile certfile cafile fullchain
  6. grafana_deploy() {
  7. _cdomain="$1"
  8. _ckey="$2"
  9. _ccert="$3"
  10. _cca="$4"
  11. _cfullchain="$5"
  12. _debug _cdomain "$_cdomain"
  13. _debug _ckey "$_ckey"
  14. _debug _ccert "$_ccert"
  15. _debug _cca "$_cca"
  16. _debug _cfullchain "$_cfullchain"
  17. cp -f "$_ckey" /etc/grafana/certs/certkey.key
  18. cp -f "$_ccert" /etc/grafana/certs/fullchain.cer
  19. return 0
  20. }