#!/bin/sh
# chkconfig: 2345 99 01
# description: letsencrypt by sv01
### BEGIN INIT INFO
# Provides: sslcerts
# Required-Start: $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: certs
### END INIT INFO
#This script is written by s1mon310
#You are allowed to change it for your own use
#You are not allowed to publish it
#This is for personal use
#Contact

for any questions!
# domains to secure
DOMAIN1_1="DOMAIN.TLD"
DOMAIN1_2="WWW.DOMAIN.TLD"
# le options
PREHOOK="service apache2 stop"
POSTHOOK="service apache2 start"
MAILADRESS="

"
case "$1" in
do)
/letsencrypt/certbot-auto certonly --pre-hook "$PREHOOK" --post-hook "$POSTHOOK" --standalone --text --email $MAILADRESS --renew-by-default --agree-tos --rsa-key-size 4096 -d $DOMAIN1_1 -d $DOMAIN1_2
;;
info)
echo "Written by s1mon310"
echo "Domain1: $DOMAIN1_1"
echo "Domain2: $DOMAIN1_2"
;;
help)
echo "Written by s1mon310"
echo "info for information , do for run" >&2
;;
*)
echo "Written by s1mon310"
echo "info for information , do for run" >&2
exit 1
;;
esac
exit 0