summaryrefslogtreecommitdiff
path: root/sshd.init
diff options
context:
space:
mode:
Diffstat (limited to 'sshd.init')
-rwxr-xr-xsshd.init49
1 files changed, 49 insertions, 0 deletions
diff --git a/sshd.init b/sshd.init
new file mode 100755
index 000000000..40cc92b86
--- /dev/null
+++ b/sshd.init
@@ -0,0 +1,49 @@
1#!/bin/bash
2
3# Init file for OpenSSH server daemon
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
18RETVAL=0
19
20case "$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
47esac
48
49exit $RETVAL