]> git.pld-linux.org Git - packages/openssh.git/blob - opensshd.upstart
- useful bits from ubuntu
[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 end script
14
15 script
16         . /etc/rc.d/init.d/functions
17         . /etc/sysconfig/network
18
19         if [ ! -s /etc/ssh/ssh_host_key ] ; then
20                 /etc/rc.d/init.d/sshd init
21         fi
22
23         if is_yes "$IPV4_NETWORKING" && is_no "$IPV6_NETWORKING"; then
24                 OPTIONS="$OPTIONS -4"
25         fi
26         if is_yes "$IPV6_NETWORKING" && is_no "$IPV4_NETWORKING"; then
27                 OPTIONS="$OPTIONS -6"
28         fi
29
30         exec /usr/sbin/sshd -D $OPTIONS
31 end script
This page took 0.124243 seconds and 4 git commands to generate.