上传文件至 /
This commit is contained in:
parent
b8d802f54d
commit
592065da22
|
@ -0,0 +1,16 @@
|
||||||
|
#!/usr/bin/bash
|
||||||
|
#检查服务是否关闭
|
||||||
|
#by fuxiaoshun 3/29
|
||||||
|
|
||||||
|
read -p "请输入服务名:" name
|
||||||
|
|
||||||
|
ss -tnlp | grep $name &>/dev/null
|
||||||
|
|
||||||
|
if [ $? -eq 0 ];then
|
||||||
|
|
||||||
|
echo "服务已经启动"
|
||||||
|
else
|
||||||
|
yum -y install $name &>/dev/null
|
||||||
|
systemctl restart $name
|
||||||
|
echo "$name 重新启动成功"
|
||||||
|
fi
|
Loading…
Reference in New Issue