diff options
Diffstat (limited to 'debian/openssh-server.ssh.upstart')
-rw-r--r-- | debian/openssh-server.ssh.upstart | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/debian/openssh-server.ssh.upstart b/debian/openssh-server.ssh.upstart new file mode 100644 index 000000000..10ab744f1 --- /dev/null +++ b/debian/openssh-server.ssh.upstart | |||
@@ -0,0 +1,30 @@ | |||
1 | # ssh - OpenBSD Secure Shell server | ||
2 | # | ||
3 | # The OpenSSH server provides secure shell access to the system. | ||
4 | |||
5 | description "OpenSSH server" | ||
6 | |||
7 | start on runlevel [2345] | ||
8 | stop on runlevel [!2345] | ||
9 | |||
10 | respawn | ||
11 | respawn limit 10 5 | ||
12 | umask 022 | ||
13 | |||
14 | env SSH_SIGSTOP=1 | ||
15 | expect stop | ||
16 | |||
17 | # 'sshd -D' leaks stderr and confuses things in conjunction with 'console log' | ||
18 | console none | ||
19 | |||
20 | pre-start script | ||
21 | test -x /usr/sbin/sshd || { stop; exit 0; } | ||
22 | test -e /etc/ssh/sshd_not_to_be_run && { stop; exit 0; } | ||
23 | test -c /dev/null || { stop; exit 0; } | ||
24 | |||
25 | mkdir -p -m0755 /var/run/sshd | ||
26 | end script | ||
27 | |||
28 | # if you used to set SSHD_OPTS in /etc/default/ssh, you can change the | ||
29 | # 'exec' line here instead | ||
30 | exec /usr/sbin/sshd -D | ||