#!/bin/bash

HOSHINOVA_VHOST_CONF='/etc/nginx/sites-available/____________________'

######################################################

/usr/bin/certbot renew --quiet && \
sed -i 's|443 ssl http2|443 ssl|g' "${HOSHINOVA_VHOST_CONF}" && \
sed -i 's|443 ssl|443 ssl http2|g' "${HOSHINOVA_VHOST_CONF}" && \
/usr/sbin/nginx -t && \
/usr/bin/systemctl restart nginx && \
/usr/bin/systemctl force-reload nginx
