mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 15:02:32 +00:00
646b193d67
SVN-Revision: 99
46 lines
483 B
Bash
46 lines
483 B
Bash
#!/bin/sh
|
|
#
|
|
# sshd Starts sshd.
|
|
#
|
|
|
|
mkdir -p /var/lock
|
|
mkdir -p /var/empty
|
|
chmod 600 /var/empty
|
|
|
|
umask 077
|
|
|
|
start() {
|
|
echo -n "Starting sshd: "
|
|
/usr/sbin/sshd
|
|
touch /var/lock/sshd
|
|
echo "OK"
|
|
}
|
|
stop() {
|
|
echo -n "Stopping sshd: "
|
|
killall sshd
|
|
rm -f /var/lock/sshd
|
|
echo "OK"
|
|
}
|
|
restart() {
|
|
stop
|
|
start
|
|
}
|
|
|
|
case "$1" in
|
|
start)
|
|
start
|
|
;;
|
|
stop)
|
|
stop
|
|
;;
|
|
restart|reload)
|
|
restart
|
|
;;
|
|
*)
|
|
echo $"Usage: $0 {start|stop|restart}"
|
|
exit 1
|
|
esac
|
|
|
|
exit $?
|
|
|