You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
611 B

#!/usr/bin/env bash
if [ -z "$1" ]; then
arg="restart"
else
arg=$1
fi
if [ "$GETSSL_OS" = "alpine" ]; then
# Switch to supervisorctl as killall -HUP won't change the listen port
supervisorctl restart vsftpd:
elif [[ "$GETSSL_OS" == "centos"[78] || "$GETSSL_OS" == "rockylinux"* ]]; then
# Hard restart the service as using -HUP won't change the listening port
if pgrep vsftpd; then
pgrep vsftpd | head -1 | xargs kill
vsftpd 3>&- 4>&-
fi
elif [[ "$GETSSL_OS" == "centos6" ]]; then
service vsftpd "$arg" 3>&- 4>&-
else
service vsftpd restart >/dev/null 3>&- 4>&-
fi