package/nodejs: security bump for 0.10.x to version 0.10.42
[buildroot-gz.git] / package / openssh / S50sshd
blobc15114257f875c5162acf5eb62497fed4f4c255a
1 #!/bin/sh
3 # sshd Starts sshd.
6 # Make sure the ssh-keygen progam exists
7 [ -f /usr/bin/ssh-keygen ] || exit 0
9 # Create any missing keys
10 /usr/bin/ssh-keygen -A
12 umask 077
14 start() {
15 printf "Starting sshd: "
16 /usr/sbin/sshd
17 touch /var/lock/sshd
18 echo "OK"
20 stop() {
21 printf "Stopping sshd: "
22 killall sshd
23 rm -f /var/lock/sshd
24 echo "OK"
26 restart() {
27 stop
28 start
31 case "$1" in
32 start)
33 start
35 stop)
36 stop
38 restart|reload)
39 restart
42 echo "Usage: $0 {start|stop|restart}"
43 exit 1
44 esac
46 exit $?