[X2Go-Commits] [live-build-x2go] 12/28: added check for already-running sshd
git-admin at x2go.org
git-admin at x2go.org
Sat Nov 18 02:33:05 CET 2017
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch feature/openbox-magic-pixel-workaround
in repository live-build-x2go.
commit 488e70e7419a99becb2246af6bfa7be112364856
Author: Stefan Baur <kontakt at baur-itcs.de>
Date: Tue Nov 7 20:41:28 2017 +0100
added check for already-running sshd
---
.../lib/live/config/2260-getsshhostkeysfrommedia | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia
index b96f0aa..96d56de 100755
--- a/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia
+++ b/config/includes.chroot/lib/live/config/2260-getsshhostkeysfrommedia
@@ -63,12 +63,16 @@ GetSSHHostKeysFromMedia ()
fi
else
- # reload sshd config
- echo -n "\n$(date +'%F | %T | ')'$0' Reloading sshd config to activate new keyfiles." | tee -a /dev/tty8
- if service ssh reload ; then
- echo -n "\n$(date +'%F | %T | ')'$0' New keyfiles activated." | tee -a /dev/tty8
+ if ps -C sshd >/dev/null 2>&1 ; then
+ # reload sshd config
+ echo -n "\n$(date +'%F | %T | ')'$0' Reloading sshd config to activate new keyfiles." | tee -a /dev/tty8
+ if service ssh reload ; then
+ echo -n "\n$(date +'%F | %T | ')'$0' New keyfiles activated." | tee -a /dev/tty8
+ else
+ echo -n "\n$(date +'%F | %T | ')'$0' Error activating new keyfiles." | tee -a /dev/tty8
+ fi
else
- echo -n "\n$(date +'%F | %T | ')'$0' Error activating new keyfiles." | tee -a /dev/tty8
+ echo -n "\n$(date +'%F | %T | ')'$0' sshd not running (yet), so no reloading required." | tee -a /dev/tty8
fi
fi
return 0
--
Alioth's /srv/git/code.x2go.org/live-build-x2go.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git
More information about the x2go-commits
mailing list