#!/usr/bin/sh #------------------------------------------------------------------------------ # /var/install/bin/certs_dehydrated-request-update # # Copyright (c) 2016-2025 The Eisfair Team, team(at)eisfair(dot)org # # Creation : 2016-09-02 jed # Last Update: $Id$ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #------------------------------------------------------------------------------ # include eislib etc. . /var/install/include/eislib module_name=`basename $0 | cut -d- -f1` logdir=/var/log configfile=/etc/config.d/${module_name} dehydrated_mode=`grep "DEHYDRATED_MODE" ${configfile} | sed -e 's/#.*$//' -e "s/^.*=['\"]\(.*\)['\"].*$/\1/"` dehydrated_challenge_type=`grep "DEHYDRATED_CHALLENGE_TYPE" ${configfile} | sed -e 's/#.*$//' -e "s/^.*=['\"]\(.*\)['\"].*$/\1/"` if [ -z "${dehydrated_challenge}" ] then dehydrated_challenge='http-01' fi clrhome mecho --info "Request Let’s Encrypt certificate update" echo echo -n "Umgebung : " mecho --warn "${dehydrated_mode}" echo "Challenge: ${dehydrated_challenge_type}" echo if /var/install/bin/ask "Do you want to force a renewal of the certificate(s)" "no" then { echo echo "${EISDATE} ${EISTIME} - manual renewal forced ..." echo "environment: ${dehydrated_mode}" echo "challenge : ${dehydrated_challenge_type}" } >> ${logdir}/${module_name}.log echo /var/install/config.d/${module_name}.sh --request-cert --force else { echo echo "${EISDATE} ${EISTIME} - manual update requested ..." } >> ${logdir}/${module_name}.log echo /var/install/config.d/${module_name}.sh --request-cert fi echo anykey #============================================================================== # end #==============================================================================