<commit_before>#!/bin/bash
set -e
#set -x

update_hpkp() {
    if [ ! -f /etc/ssl/$1/cert.pem ]; then
        sleep 5
        update_hpkp $1 &
    else
        echo "certificate for $1 found"
        /etc/scripts/make_hpkp $1
        nginx -t
        set +e
        nginx -s reload 2> /dev/null
        set -e
    fi

}
if [ "${1}" = 'nginx' ]; then

    # replace all set ${ENV}
    /etc/scripts/nginx_env
    /etc/scripts/make_csp

    #for domain in $(echo ${NGINX_DOMAIN} | sed "s/,/ /g"); do
    domain=${NGINX_DOMAIN}
    echo "setup certificate for ${domain}"
    if [ ! -f /etc/ssl/${domain}/cert.pem ]; then
        /etc/scripts/make_ecdsa_cert ${domain}
        rm /etc/ssl/${domain}/cert.pem
        echo "docker run -e ... -v ... willfarrell/letsencrypt dehydrated --cron --out /etc/ssl --challenge ..."
        update_hpkp ${domain} &
        nginx -t
    else
        update_hpkp ${domain}
    fi
    #done

	# custom startup script
	/etc/scripts/bootstrap

fi

echo "${@}"
exec "${@}"<commit_msg>update base cert gen for multi<commit_after>#!/bin/bash
set -e
#set -x

update_hpkp() {
    if [ ! -f /etc/ssl/$1/cert.pem ]; then
        sleep 5
        update_hpkp $1 &
    else
        echo "certificate for $1 found"
        /etc/scripts/make_hpkp $1
        nginx -t
        set +e
        nginx -s reload 2> /dev/null
        set -e
    fi

}
if [ "${1}" = 'nginx' ]; then

    # replace all set ${ENV}
    /etc/scripts/nginx_env
    /etc/scripts/make_csp

    for domain in $(echo ${NGINX_DOMAIN} | sed "s/,/ /g"); do
        #domain=${NGINX_DOMAIN}
        echo "setup certificate for ${domain}"
        if [ ! -f /etc/ssl/${domain}/cert.pem ]; then
            /etc/scripts/make_ecdsa_cert ${domain}
            rm /etc/ssl/${domain}/cert.pem
            echo "docker run -e ... -v ... willfarrell/letsencrypt dehydrated --cron --domain ${domain} --out /etc/ssl --challenge ..."
            update_hpkp ${domain} &
            nginx -t
        else
            update_hpkp ${domain}
        fi
    done

	# custom startup script
	/etc/scripts/bootstrap

fi

echo "${@}"
exec "${@}"
{'fraction_non_alphanumeric': 0.15421227986673014, 'fraction_numerical': 0.006663493574488339, 'mean_word_length': 1.7730870712401055, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3583406', 'n_tokens_mistral': 780, 'n_tokens_neox': 749, 'n_words': 195}