summaryrefslogtreecommitdiff
path: root/sshd.init
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-10-29 09:47:09 +1000
committerDamien Miller <djm@mindrot.org>1999-10-29 09:47:09 +1000
commit792c5113f1ba364680d294806ac0972b3deaceec (patch)
tree8b115d4108aec7423994efca34ec6a9f67c7b370 /sshd.init
parenta37010e4669933490c2347940bceba98ddfc2863 (diff)
downloadopenssh-git-792c5113f1ba364680d294806ac0972b3deaceec.tar.gz
Update to OpenBSD ssh-19991029
Renamed init script and PAM config
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 00000000..40cc92b8
--- /dev/null
+++ b/sshd.init
@@ -0,0 +1,49 @@
+#!/bin/bash
+
+# Init file for OpenSSH server daemon
+#
+# chkconfig: 2345 55 25
+# description: OpenSSH server daemon
+#
+# processname: sshd
+# config: /etc/ssh/ssh_host_key
+# config: /etc/ssh/ssh_host_key.pub
+# config: /etc/ssh/ssh_random_seed
+# config: /etc/ssh/sshd_config
+# pidfile: /var/run/sshd.pid
+
+# source function library
+. /etc/rc.d/init.d/functions
+
+RETVAL=0
+
+case "$1" in
+ start)
+ echo -n "Starting sshd: "
+ daemon /usr/sbin/sshd
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sshd
+ echo
+ ;;
+ stop)
+ echo -n "Shutting down sshd: "
+ killproc sshd
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sshd
+ echo
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ RETVAL=$?
+ ;;
+ status)
+ status sshd
+ RETVAL=$?
+ ;;
+ *)
+ echo "Usage: sshd {start|stop|restart|status}"
+ exit 1
+esac
+
+exit $RETVAL