summaryrefslogtreecommitdiff
path: root/security/hpn-ssh/files/sshd.sh
blob: ba52de02fe7bbebcdcaa554c448969f736418fdb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
case "$1" in
start)
	__PREFIX__/sbin/sshd
	echo -n ' sshd'
	;;
stop)
	if [ -f /var/run/sshd.pid ]; then
		kill -TERM `cat /var/run/sshd.pid`
		rm -f /var/run/sshd.pid
		echo -n ' sshd'
	fi
	;;
restart)
	if [ -f /var/run/sshd.pid ]; then
		kill -HUP `cat /var/run/sshd.pid`
		echo 'sshd restarted'
	fi
	;;
*)
	echo "Usage: ${0##*/}: { start | stop | restart }" 2>&1
	exit 65
	;;
esac