fix vhostssl
#!/bin/bash
if [[ "$#" -lt "1" ]]; then
<------>echo "Generate ssl certificate for domain(s)" >&2
<------>echo "Usage: $0 <root_domain> [...certbot params]" >&2
<------>exit 255
fi
source /opt/izhpt/etc/mapvhost.conf.in
source /opt/izhpt/lib/logging.in.sh
source /opt/izhpt/lib/run_parts.in.sh
if [[ $(id -u $LETSENCRYPT_USER) != $(id -u) ]]; then
log_info "Getting neccessary privileges"
sudo -u $LETSENCRYPT_USER "$0" "$@"
exit $?
fi
VHOST=$1
shift 1
certbot certonly --webroot --webroot-path $VHOST_LETSENCRYPT_DIR -d $VHOST "$@"