We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f5b33c6 + 5c0e11a commit 8dfa644Copy full SHA for 8dfa644
bin/v-list-sys-services
@@ -94,6 +94,11 @@ get_srv_state() {
94
if [ -z "$pids" ] && [ "$name" != 'nginx' ]; then
95
pids=$(pgrep $name |tr '\n' '|')
96
fi
97
+
98
+ # Prevent from an SSH false positive when there is a TTY or SFTP connection but service is down
99
+ if [ "$name" == 'ssh' ] && [ "$(systemctl show sshd.service | grep 'SubState=' | cut -f2 -d=)" != "running" ]; then
100
+ pids=''
101
+ fi
102
103
# Checking pid
104
if [ -n "$pids" ]; then
0 commit comments