1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-14 03:10:47 +00:00
freebsd-ports/security/ssh2/files/sshd.sh
Ying-Chieh Liao cff16e3928 1.) If WITH_STATIC_SFTP is defined, ssh-chrootmgr works.
2.)	If libX11.a exists and xauth not, the build of ssh2 fails. This
	patch fix this.
3.)	ssh2/files/sshd.sh looks for the wrong pid file in /var/run.
	This patch fix this and adds 2> /dev/null to the sshd2 startup

PR:		46012
Submitted by:	maintainer
2003-01-02 19:35:26 +00:00

28 lines
487 B
Bash

#!/bin/sh
case "$1" in
start)
!!PREFIX!!/sbin/sshd 2> /dev/null
echo -n ' sshd'
;;
stop)
if [ -f /var/run/sshd2_22.pid ]; then
kill -TERM `cat /var/run/sshd2_22.pid`
rm -f /var/run/sshd2_22.pid
echo -n ' sshd'
fi
;;
restart)
if [ -f /var/run/sshd2_22.pid ]; then
kill -HUP `cat /var/run/sshd2_22.pid`
echo 'sshd restarted'
fi
;;
-h)
echo "Usage: `basename $0` { start | stop | restart }"
;;
*)
!!PREFIX!!/sbin/sshd
echo -n ' sshd'
;;
esac