判断ssh是否运行
1
2
3
4
5
6
7
8 #!/bin/bash
service=$( systemctl is-active sshd )
if [ "$service" == active ];then
echo "$service is running"
else
systemctl restart sshd
echo "sshd is started"
if
阅读剩余
版权声明:
作者:jon
链接:https://www.linux18.cn/?p=226
文章版权归作者所有,未经允许请勿转载。
THE END