CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
e2fsprogs: updated to 1.42.13 and updated mandir
[crossrootfs.git] / openssh / sshd
CommitLineData
fe2701c6
VM
1#!/bin/sh
2#
3# /etc/rc.d/sshd: start/stop ssh daemon
4#
5
6case $1 in
7start)
8 if [ ! -f /etc/ssh/ssh_host_key ]; then
9 /usr/bin/ssh-keygen -t rsa1 -N "" -f /etc/ssh/ssh_host_key > /dev/null
10 fi
11 if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
12 /usr/bin/ssh-keygen -t rsa -N "" -f /etc/ssh/ssh_host_rsa_key > /dev/null
13 fi
14 if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then
15 /usr/bin/ssh-keygen -t dsa -N "" -f /etc/ssh/ssh_host_dsa_key > /dev/null
16 fi
17 if [ ! -f /etc/ssh/ssh_host_ecdsa_key ]; then
18 /usr/bin/ssh-keygen -t ecdsa -N "" -f /etc/ssh/ssh_host_ecdsa_key > /dev/null
19 fi
20 /usr/sbin/sshd
21 ;;
22stop)
23 if [ -f /var/run/sshd.pid ]; then
24 kill $(< /var/run/sshd.pid)
25 rm -f /var/run/sshd.pid
26 else
27 killall -q /usr/sbin/sshd
28 fi
29 ;;
30restart)
31 $0 stop
32 sleep 2
33 $0 start
34 ;;
35*)
36 echo "usage: $0 [start|stop|restart]"
37 ;;
38esac
39
40# End of file