At the moment we run the renwals of several servers manually using acme.sh v3.0+
The cron job is there to renew cert and it uses cloudflare token and this all works perfectly.
The issue we have is requiring further scripting to stop our particular mail server rename the cert and copy it into place and start the server - very trivial yes !
Is there a way or method to do this (as root) included in the acme.sh ?
The command is listed below and manually run prior to ssl expirey it has to be run as root
/usr/local/kerio/mailserver/keriomailserver stop
cp ~/.acme.sh/name.domain.com/fullchain.cer /usr/local/kerio/mailserver/sslcert/server.crt
cp ~/.acme.sh/name.domain.com/name.domain.com.key /usr/local/kerio/mailserver/sslcert/server.key
/usr/local/kerio/mailserver/keriomailserver start
Fantastic ! To configure this as a cronjob for example for a cert that was renewed today (already) how can i do this without triggering a new cert call ? Thanks for you help so far !
if i remove the \ and add the full path to the acme directory the first command works but doing the following command fails :
/Users/username/.acme.sh/acme.sh --key-file /usr/local/kerio/mailserver/sslcert/server.key
opens the help dialogue as below:
v3.0.1
Usage: acme.sh ... [parameters ...]
Commands:
-h, --help Show this help message.
-v, --version Show version info.
--install Install acme.sh to your system.
--uninstall Uninstall acme.sh, and uninstall the cron job.
--upgrade Upgrade acme.sh to the latest code from GitHub - acmesh-official/acme.sh: A pure Unix shell script implementing ACME client protocol.
--issue Issue a cert.
--deploy Deploy the cert to your server.
-i, --install-cert Install the issued cert to apache/nginx or any other server.
-r, --renew Renew a cert.
--renew-all Renew all the certs.
--revoke
yes im on the same plane i was just trying that as you typed heres the result :
bash-3.2# /Users/localname/.acme.sh/acme.sh --install-cert -d name.domain.com -d autodiscover.domain.com --key-file "/usr/local/kerio/mailserver/sslcert/server.key" --fullchain-file "/usr/local/kerio/mailserver/sslcert/server.crt” --reloadcmd "/usr/local/kerio/mailserver/keriomailserver stop; /usr/local/kerio/mailserver/keriomailserver start”
[Wed 12 Jan 2022 15:11:56 AEDT] Unknown parameter : stop
So, I don't think the "unknown parameter" message is coming from acme.sh.
I want you to double check that the stop/start commands actually work on their own, because I don't think there's anything wrong with the acme.sh parts.