27 lines
598 B
Bash
Executable File
27 lines
598 B
Bash
Executable File
#!/bin/sh
|
|
|
|
. /etc/init.d/init-functions
|
|
|
|
case "$1" in
|
|
start)
|
|
notify "Starting sshd "
|
|
/usr/bin/sshd -D &
|
|
echo $! > /var/run/ssh.pid
|
|
check $?
|
|
;;
|
|
stop)
|
|
notify "Stopping sshd "
|
|
killall sshd
|
|
rm /var/run/ssh.pid
|
|
check $?
|
|
;;
|
|
restart|reload)
|
|
"$0" stop
|
|
"$0" start
|
|
;;
|
|
*)
|
|
echo "sshd init script usage: $0 {start|stop|restart}"
|
|
return 1
|
|
esac
|
|
return $?
|