Skip to content

Commit 1300cf8

Browse files
author
digoal
committed
fix
1 parent b7dd585 commit 1300cf8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

202310/20231029_01.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ pwd="digoal用户密码"
193193
locallistenip="127.0.0.1"
194194
locallistenport="1111"
195195
196-
if pgrep -x "ssh" >/dev/null
196+
if pgrep -x "ssh" >/dev/null && [ $(ps -efw|grep -v grep|grep ssh|grep -c $locallistenport) -eq 1 ]
197197
then
198198
echo "ssh 进程正在运行"
199199
else

0 commit comments

Comments
 (0)