From 354c11fc251f3b169d28576318bbd88189e6c376 Mon Sep 17 00:00:00 2001 From: Gregory Colpart Date: Thu, 31 Aug 2023 14:45:21 +0200 Subject: [PATCH] ajout hook certbot pour ProFTPD --- certbot/files/hooks/deploy/proftpd.sh | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 certbot/files/hooks/deploy/proftpd.sh diff --git a/certbot/files/hooks/deploy/proftpd.sh b/certbot/files/hooks/deploy/proftpd.sh new file mode 100755 index 00000000..2a28fb07 --- /dev/null +++ b/certbot/files/hooks/deploy/proftpd.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +readonly PROGNAME=$(basename "$0") +readonly ARGS=$@ + +readonly VERBOSE=${VERBOSE:-"0"} +readonly QUIET=${QUIET:-"0"} + +error() { + >&2 echo "${PROGNAME}: $1" + exit 1 +} +debug() { + if [ "${VERBOSE}" = "1" ] && [ "${QUIET}" != "1" ]; then + >&2 echo "${PROGNAME}: $1" + fi +} + +if [ -n "$(pidof proftpd)" ]; then + if $($(command -v proftpd) -t 2> /dev/null); then + debug "ProFTPD detected... reloading" + service proftpd reload + else + error "ProFTPD config is broken, you must fix it !" + fi +else + debug "ProFTPD is not running. Skip." +fi