]> git.pld-linux.org Git - packages/openssh.git/blobdiff - opensshd.init
fix sshd-keygen location in on demand service; rel 2
[packages/openssh.git] / opensshd.init
index f78007ea96c8d3fdd3c35bbb30f7033d6bc63f9d..fe09962804e874f80f8c4aa76b3eb5772e065cf2 100755 (executable)
@@ -11,8 +11,6 @@
 # Source function library
 . /etc/rc.d/init.d/functions
 
-upstart_controlled --except init configtest
-
 # Get network config
 . /etc/sysconfig/network
 
@@ -51,14 +49,14 @@ ssh_gen_keys() {
 
 start() {
        # Check if the service is already running?
-       if [ -f /var/lock/subsys/sshd ]; then
+       if status --pidfile $PIDFILE sshd >/dev/null; then
                msg_already_running "OpenSSH"
                return
        fi
 
        checkconfig
 
-       if [ ! -s /etc/ssh/ssh_host_key ]; then
+       if [ "$(echo /etc/ssh/ssh_host*key)" = "/etc/ssh/ssh_host*key" ]; then
                msg_not_running "OpenSSH"
                nls "No SSH host key found! You must run \"%s init\" first." "$0"
                exit 1
This page took 0.028554 seconds and 4 git commands to generate.