if语句chkvsftp.sh
vsftp检查脚本
#!/bin/bash
#function:演示
#author:tommy 20211013
systemctl status vsftpd &> /dev/null
if
[ $? -eq 0 ]
then
echo "监听地址:$(netstat -anpt | grep vsftpd |awk '{print $4}')"
echo "进程PID号:$(pgrep -x vsftpd)"
else
echo "警告:vsftpd服务不可用!"
fi
#function:演示
#author:tommy 20211013
systemctl status vsftpd &> /dev/null
if
[ $? -eq 0 ]
then
echo "监听地址:$(netstat -anpt | grep vsftpd |awk '{print $4}')"
echo "进程PID号:$(pgrep -x vsftpd)"
else
echo "警告:vsftpd服务不可用!"
fi
上一技术:if语句pinghost
下一技术:nginx部署+反向代理