Connect. Communicate. Collaborate. Securely.

Home » Kerio User Forums » Kerio Connect » Start/stop service CLI
  •  
MaddogsNL

Messages: 11
Karma: 0
Send a private message to this user
Is there any way to start/stop kerio services through the command line? I want to write a script to stop HTTP(S) and renew all my letsencrypt certificates and start the services again.

Thanks!
  •  
Radek Sip (Kerio)

Messages: 1302
Karma: 48
Send a private message to this user
Similar to another services in your operating system.

Stay Connected Anytime, Anywhere. Discover Kerio Cloud!
  •  
Brian Carmichael (Kerio)

Messages: 559
Karma: 55
Send a private message to this user
You would need to restart the entire Kerio Connect service using for example:
net stop kerio-connect && net start [service name] (for Windows OS)
service kerio-connect restart (for Linux OS)
Restarting only the HTTP service would not install the updated certificate. You need to restart the entire Kerio Connect service.

Brian Carmichael
Senior Technical Marketing Engineer | Kerio
Stay Connected Anytime, Anywhere. Discover Kerio Cloud!
  •  
MaddogsNL

Messages: 11
Karma: 0
Send a private message to this user
That's correct Brian, makes it easier though. We will just check en install in the nights then. Thanks!
  •  
MaddogsNL

Messages: 11
Karma: 0
Send a private message to this user
No Message Body

[Updated on: Fri, 05 August 2016 13:47]

  •  
sim72

Messages: 6
Karma: 0
Send a private message to this user
Have you implemented successfully the letsencrypt certificates?

I have generated certificates files on a debian machine, but my kerio connect is running on windows server Sad

Do you have any advice? Can i copy/move this files?

Thank you
  •  
MaddogsNL

Messages: 11
Karma: 0
Send a private message to this user
We did actually. See the part of our script which places the certificates in the right place (if they do not exist already).

FILE="/opt/kerio/mailserver/sslcert/$1.crt"

if [ ! -f $FILE ]

then

echo "$(date) INFO:     Certificaat voor $1 bestaat nog niet, links zullen worden aangemaakt." | tee -a "$LOG"
ln -s /etc/letsencrypt/live/mx.$1/fullchain.pem /opt/kerio/mailserver/sslcert/$1.crt
ln -s /etc/letsencrypt/live/mx.$1/privkey.pem /opt/kerio/mailserver/sslcert/$1.key

else

echo "$(date) INFO:     Certificaat voor $1 bestaat al, links worden verwijderd en opnieuw aangemaakt!" | tee -a "$LOG"

rm /opt/kerio/mailserver/sslcert/$1.*
echo "$(date) DELETE:     Bestaand certificaat verwijderd (Kerio)" | tee -a "$LOG"

rm -rf /etc/letsencrypt/live/*$1*
echo "$(date) DELETE:     Bestaand certificaat verwijderd (Letsencrypt-live)" | tee -a "$LOG"

rm -rf /etc/letsencrypt/renewal/*$1*
echo "$(date) DELETE:     Bestaand certificaat verwijderd (Letsencrypt-renewal)" | tee -a "$LOG"

rm -rf /etc/letsencrypt/archive/*$1*
echo "$(date) DELETE:     Bestaand certificaat verwijderd (Letsencrypt-archive)" | tee -a "$LOG"

ln -s /etc/letsencrypt/live/mx.$1/fullchain.pem /opt/kerio/mailserver/sslcert/$1.crt
echo "$(date) INSERT:     Certificaat aangemaakt (Letsencrypt-crt)" | tee -a "$LOG"

ln -s /etc/letsencrypt/live/mx.$1/privkey.pem /opt/kerio/mailserver/sslcert/$1.key
echo "$(date) INSERT:     Key aangemaakt (Letsencrypt-key)" | tee -a "$LOG"

fi

[Updated on: Wed, 02 November 2016 14:25]

Previous Topic: Smtp Transaction Time Issue
Next Topic: Expire Message
Goto Forum:
  


Disclaimer:
Kerio discussion forums are intended for open communication between forum members and may contain information and material posted by members which may be useful in learning about Kerio products. The discussion forums are not intended to provide technical support for any specific product. Any information implied or expressed in the discussion forums is that of the posting member. Kerio is in no way responsible for the information posted in the forums, or its accuracy. Kerio employees may participate in the discussions, but their postings do not represent an offical position of the company on any issues raised or discussed. Kerio reserves the right to monitor and maintain the forums to promote free and accurate exchange of information.

Current Time: Sat Dec 03 22:46:40 CET 2016

Total time taken to generate the page: 0.01143 seconds
.:: Contact :: Home ::.
Powered by: FUDforum 3.0.4.