Letsencrypt adding new certificate with Certboot

What is Letsencrypt !

Letsencrypt is platform that providing free ssl certificate

What is Certbot

Certbot is open source command line tool for generating ssl certificate.

Adding new certificate
 sudo certbot certonly --standalone -d example.com
for nginx
sudo certbot --nginx
for apache
sudo certbot --apache

Unless you don't use additional --certonly parameter, certbot will replace nginx and apache configuration

Renewing certiticates

Letsencrypt certificates have default 3 months expire date. we need to renew certificates periodically, otherwise website might have availability problems due to expired certificate

sudo certbot renew 

List Certificates

 sudo certbot certificates

Mac os x sleep from command line

Mac has sleeping button on the apple icon -> sleep. Another effective way is sleeping from command line

pmset sleepnow

this command sleeps mac immediatelly

Sleeping delay
if we want to sleep after specific period, we can wait command awhile, and after system trigger command

for example sleeping after 10 seconds

sleep 10;pmset sleepnow