forked from evolix/ansible-roles
ajout hook certbot pour ProFTPD
This commit is contained in:
parent
8ca7cc4692
commit
354c11fc25
28
certbot/files/hooks/deploy/proftpd.sh
Executable file
28
certbot/files/hooks/deploy/proftpd.sh
Executable file
|
@ -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
|
Loading…
Reference in a new issue