mirror of
https://github.com/unraid/webgui.git
synced 2026-02-07 09:29:18 -06:00
Merge pull request #1869 from ich777/ich777-rc.sshd-fix
Fix for rc.sshd
This commit is contained in:
@@ -26,7 +26,7 @@ sshd_running(){
|
||||
# get all pids from sshd
|
||||
for pid in $(pgrep -f $SSHD); do
|
||||
# check if a sshd is running on host system
|
||||
if ! grep -qE '/docker/|/lxc/' /proc/$pid/cgroup; then
|
||||
if ! grep -qE '/docker|/lxc' /proc/$pid/cgroup; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
@@ -77,7 +77,7 @@ sshd_stop(){
|
||||
# get all pids from sshd
|
||||
for pid in $(pgrep -f $SSHD); do
|
||||
# make sure to kill only sshd from host system
|
||||
if ! grep -qE '/docker/|/lxc/' /proc/$pid/cgroup; then
|
||||
if ! grep -qE '/docker|/lxc' /proc/$pid/cgroup; then
|
||||
kill $pid
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user