<commit_before>#!/bin/bash

# input for files
printf "Domain (with ending) : "
read DOMAIN
if [ -z "$DOMAIN" ]; then
   echo "No Domain entered. Exiting..."
   exit
fi

printf "Subdomain (ie. mail, www): "
read SUBDOMAIN
if [ -z "$SUBDOMAIN" ]; then
   echo "No Subdomain entered. Exiting..."
   exit
fi
FOLDER=$SUBDOMAIN"."$DOMAIN

# check with uber script
MAIL=$(uberspace-prepare-certificate -c ./$FOLDER/${SUBDOMAIN}_startssl.pem -k ./$FOLDER/${SUBDOMAIN}_privatekey.pem  -i ./sub.class1.server.ca.pem)

# check if cert are correct
FINE="Let's check the files... Key is okay... Certificate is okay... Certificate matches key... All good! Feel free to mail to <EMAIL>, please include the following information:"


if [[ "${MAIL/$FINE}" = "$MAIL" ]]; then
   # echo "True"
   echo -e "$MAIL"
   # mail it to uberspace
   echo -e "$MAIL" | mail -s "Please add the certificates" <EMAIL>
   echo "Mail was send to <EMAIL>" 
else
   echo "Unknown Error:"
   echo
   echo $MAIL<commit_msg>fix typo<commit_after>#!/bin/bash

# input for files
printf "Domain (with ending) : "
read DOMAIN
if [ -z "$DOMAIN" ]; then
   echo "No Domain entered. Exiting..."
   exit
fi

printf "Subdomain (ie. mail, www): "
read SUBDOMAIN
if [ -z "$SUBDOMAIN" ]; then
   echo "No Subdomain entered. Exiting..."
   exit
fi
FOLDER=$SUBDOMAIN"."$DOMAIN

# check with uber script
MAIL=$(uberspace-prepare-certificate -c ./$FOLDER/${SUBDOMAIN}_startssl.pem -k ./$FOLDER/${SUBDOMAIN}_privatekey.pem  -i ./sub.class1.server.ca.pem)

# check if cert are correct
FINE="Let's check the files... Key is okay... Certificate is okay... Certificate matches key... All good! Feel free to mail to <EMAIL>, please include the following information:"


if [[ "${MAIL/$FINE}" = "$MAIL" ]]; then
   # echo "True"
   echo -e "$MAIL"
   # mail it to uberspace
   echo -e "$MAIL" | mail -s "Please add the certificates" <EMAIL>
   echo "Mail was sent to <EMAIL>" 
else
   echo "Unknown Error:"
   echo
   echo $MAIL
{'fraction_non_alphanumeric': 0.15048296898830707, 'fraction_numerical': 0.0010167768174885613, 'mean_word_length': 3.3348017621145374, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '2837955', 'n_tokens_mistral': 681, 'n_tokens_neox': 688, 'n_words': 236}