File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ case "${1}" in
39
39
start)
40
40
log_daemon_msg " Starting FTP server" " ${NAME} "
41
41
42
- if [ -e /etc/vsftpd.conf ] && ! egrep -iq " ^ *listen(_ipv6)? *= *yes" /etc/vsftpd.conf
42
+ if [ -e /etc/vsftpd.conf ] && ! grep -Eiq " ^ *listen(_ipv6)? *= *yes" /etc/vsftpd.conf
43
43
then
44
44
log_warning_msg " vsftpd disabled - listen disabled in config."
45
45
exit 0
@@ -51,15 +51,15 @@ case "${1}" in
51
51
while [ ${n} -le 5 ]
52
52
do
53
53
_PID=" $( if [ -e /var/run/vsftpd/vsftpd.pid ]; then cat /var/run/vsftpd/vsftpd.pid; fi) "
54
- if ! ps -C vsftpd | grep -qs " ${_PID} "
54
+ if pgrep vsftpd --pidfile /var/run/ vsftpd/vsftpd.pid > /dev/null
55
55
then
56
56
break
57
57
fi
58
58
sleep 1
59
59
n=$(( $n + 1 ))
60
60
done
61
61
62
- if ps -C vsftpd | grep -qs " ${_PID} "
62
+ if ! pgrep vsftpd --pidfile /var/run/vsftpd/vsftpd.pid > /dev/null
63
63
then
64
64
log_warning_msg " vsftpd failed - probably invalid config."
65
65
exit 1
You can’t perform that action at this time.
0 commit comments