354c11fc25
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
29 lines
589 B
Bash
Executable file
29 lines
589 B
Bash
Executable file
#!/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
|