]> git.pld-linux.org Git - packages/openssh.git/blob - opensshd.upstart
- rebuild with openssl-1.0.1k
[packages/openssh.git] / opensshd.upstart
1
2 start on pld.network-started and started SERVICE_syslog=y and started random
3 stop on pld.shutdown-started
4
5 respawn
6 respawn limit 10 5
7 console output
8 oom never
9
10 pre-start script
11         test -x /usr/sbin/sshd || { stop; exit 0; }
12         test -c /dev/null || { stop; exit 0; }
13
14         if [ ! -s /etc/ssh/ssh_host_key \
15                 -o ! -s /etc/ssh/ssh_host_rsa_key \
16                 -o ! -s /etc/ssh/ssh_host_dsa_key \
17                 -o ! -s /etc/ssh/ssh_host_ecdsa_key \
18         ]; then
19                 # call gen keys if any of the files above is missing or empty
20                 /etc/rc.d/init.d/sshd ssh_gen_keys
21         fi
22 end script
23
24 script
25         . /etc/rc.d/init.d/functions
26         . /etc/sysconfig/network
27
28         if is_yes "$IPV4_NETWORKING" && is_no "$IPV6_NETWORKING"; then
29                 OPTIONS="$OPTIONS -4"
30         fi
31         if is_yes "$IPV6_NETWORKING" && is_no "$IPV4_NETWORKING"; then
32                 OPTIONS="$OPTIONS -6"
33         fi
34
35         exec /usr/sbin/sshd -D $OPTIONS
36 end script
This page took 0.024206 seconds and 3 git commands to generate.