ajout hook certbot pour ProFTPD
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|2622|3|2619|4|:+1:
Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/334//ansiblelint">Evolix » ansible-roles » unstable #334</a>
gitea/ansible-roles/pipeline/head This commit looks good
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|2622|3|2619|4|:+1:
Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/334//ansiblelint">Evolix » ansible-roles » unstable #334</a>
gitea/ansible-roles/pipeline/head This commit looks good
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