#!/bin/bash # copy acme-chanllenge echo "copy acme-challenge" cp /home/acme-challenge.conf /etc/nginx/conf.d/acme-challenge.conf # add crontab entry to renew the letsencrypt certificate echo "adding crontab" echo "0 23 * * * certbot renew --dry-run" | crontab - crontab -l # start nginx echo "starting nginx" nginx