summaryrefslogtreecommitdiff
path: root/contrib/redhat/sshd.init-5.x
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-08-08 16:53:28 +1000
committerDamien Miller <djm@mindrot.org>2000-08-08 16:53:28 +1000
commitab8d1921f4598baa9b8596d7f8b6bbded9acfb33 (patch)
treee3301ff26a8093a6e9faa5894c2ac3e05269e2aa /contrib/redhat/sshd.init-5.x
parent52652f5cef3d2a4441117cde95855d039a866bbe (diff)
- (djm) Cleanup Redhat RPMs. Generate keys at runtime rather than install
time, spec file cleanup.
Diffstat (limited to 'contrib/redhat/sshd.init-5.x')
-rwxr-xr-xcontrib/redhat/sshd.init-5.x61
1 files changed, 61 insertions, 0 deletions
diff --git a/contrib/redhat/sshd.init-5.x b/contrib/redhat/sshd.init-5.x
new file mode 100755
index 000000000..e836b6919
--- /dev/null
+++ b/contrib/redhat/sshd.init-5.x
@@ -0,0 +1,61 @@
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 if [ ! -f /var/run/sshd.pid ] ; then
24 case "`type -type success`" in
25 function)
26 /usr/sbin/sshd && success "sshd startup" || failure "sshd startup"
27 RETVAL=$?
28 ;;
29 *)
30 /usr/sbin/sshd && echo -n "sshd "
31 RETVAL=$?
32 ;;
33 esac
34 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sshd
35 fi
36 echo
37 ;;
38 stop)
39 echo -n "Shutting down sshd: "
40 if [ -f /var/run/sshd.pid ] ; then
41 killproc sshd
42 fi
43 echo
44 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sshd
45 ;;
46 restart)
47 $0 stop
48 $0 start
49 RETVAL=$?
50 ;;
51 status)
52 status sshd
53 RETVAL=$?
54 ;;
55 *)
56 echo "Usage: sshd {start|stop|restart|status}"
57 exit 1
58 ;;
59esac
60
61exit $RETVAL