From f9a132ccd270a766e732c5af332165a2f340f18c Mon Sep 17 00:00:00 2001 From: srvrco Date: Thu, 22 Dec 2016 16:28:13 +0000 Subject: [PATCH] adding cpanel_cert_upload script --- other_scripts/cpanel_cert_upload | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 other_scripts/cpanel_cert_upload diff --git a/other_scripts/cpanel_cert_upload b/other_scripts/cpanel_cert_upload new file mode 100644 index 0000000..a76181b --- /dev/null +++ b/other_scripts/cpanel_cert_upload @@ -0,0 +1,31 @@ +#!/bin/bash +# +# a simple script for use on shared cpanel server to automatically add the +# the certificates to cpanel if the uapi function is available +# use with RELOAD_CMD="${HOME}/cpanel_cert_upload domain.com" + +domain="$1" + +rawurlencode() { + local string + string=$(cat "${1}") + local strlen=${#string} + local encoded="" + local pos c o + + for (( pos=0 ; pos