diff options
author | Damien Miller <djm@mindrot.org> | 1999-10-27 13:42:43 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 1999-10-27 13:42:43 +1000 |
commit | d4a8b7e34dd619a4debf9a206c81db26d1402ea6 (patch) | |
tree | a47d770a2f790f40d18b0982d4e55fa7cfb1fa3b /sshd.init |
Initial revision
Diffstat (limited to 'sshd.init')
-rwxr-xr-x | sshd.init | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/sshd.init b/sshd.init new file mode 100755 index 000000000..b36b57aa6 --- /dev/null +++ b/sshd.init | |||
@@ -0,0 +1,49 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | # Init file for OpenSSH sshd | ||
4 | # | ||
5 | # chkconfig: 2345 55 25 | ||
6 | # description: OpenSSH server daemon | ||
7 | # | ||
8 | # processname: sshd | ||
9 | # config: /etc/ssh/ssh_host_key | ||
10 | # config: /etc/ssh/ssh_host_key.pub | ||
11 | # config: /etc/ssh/ssh_random_seed | ||
12 | # config: /etc/ssh/sshd_config | ||
13 | # pidfile: /var/run/sshd.pid | ||
14 | |||
15 | # source function library | ||
16 | . /etc/rc.d/init.d/functions | ||
17 | |||
18 | RETVAL=0 | ||
19 | |||
20 | case "$1" in | ||
21 | start) | ||
22 | echo -n "Starting sshd: " | ||
23 | daemon /usr/sbin/sshd | ||
24 | RETVAL=$? | ||
25 | [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sshd | ||
26 | echo | ||
27 | ;; | ||
28 | stop) | ||
29 | echo -n "Shutting down sshd: " | ||
30 | killproc sshd | ||
31 | RETVAL=$? | ||
32 | [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sshd | ||
33 | echo | ||
34 | ;; | ||
35 | restart) | ||
36 | $0 stop | ||
37 | $0 start | ||
38 | RETVAL=$? | ||
39 | ;; | ||
40 | status) | ||
41 | status sshd | ||
42 | RETVAL=$? | ||
43 | ;; | ||
44 | *) | ||
45 | echo "Usage: sshd {start|stop|restart|status}" | ||
46 | exit 1 | ||
47 | esac | ||
48 | |||
49 | exit $RETVAL | ||