Browse Source

Change to use pgrep (fixes ubuntu14 ftp tests)

pull/731/head
Tim Kimber 4 years ago
parent
commit
3b90477cf3
No known key found for this signature in database GPG Key ID: 3E1804964E76BD18
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      test/test-config/vsftpd.initd

+ 3
- 3
test/test-config/vsftpd.initd View File

@ -39,7 +39,7 @@ case "${1}" in
start)
log_daemon_msg "Starting FTP server" "${NAME}"
if [ -e /etc/vsftpd.conf ] && ! egrep -iq "^ *listen(_ipv6)? *= *yes" /etc/vsftpd.conf
if [ -e /etc/vsftpd.conf ] && ! grep -Eiq "^ *listen(_ipv6)? *= *yes" /etc/vsftpd.conf
then
log_warning_msg "vsftpd disabled - listen disabled in config."
exit 0
@ -51,7 +51,7 @@ case "${1}" in
while [ ${n} -le 5 ]
do
_PID="$(if [ -e /var/run/vsftpd/vsftpd.pid ]; then cat /var/run/vsftpd/vsftpd.pid; fi)"
if ! ps -C vsftpd | grep -qs "${_PID}"
if pgrep vsftpd --pidfile /var/run/vsftpd/vsftpd.pid >/dev/null
then
break
fi
@ -59,7 +59,7 @@ case "${1}" in
n=$(( $n + 1 ))
done
if ps -C vsftpd | grep -qs "${_PID}"
if ! pgrep vsftpd --pidfile /var/run/vsftpd/vsftpd.pid >/dev/null
then
log_warning_msg "vsftpd failed - probably invalid config."
exit 1


Loading…
Cancel
Save