aboutsummaryrefslogtreecommitdiff
path: root/security/ssh2
diff options
context:
space:
mode:
authorWill Andrews <will@FreeBSD.org>2000-04-05 22:21:44 +0000
committerWill Andrews <will@FreeBSD.org>2000-04-05 22:21:44 +0000
commit810b23015a0381c37aaa2071cb7b425d30ff42e7 (patch)
tree49e7e7c2fc108456e79e92b75c5ad54f32df3dcb /security/ssh2
parentb11c4333de66b56faadbb9b76355499493ce9f8b (diff)
downloadports-810b23015a0381c37aaa2071cb7b425d30ff42e7.tar.gz
ports-810b23015a0381c37aaa2071cb7b425d30ff42e7.zip
Notes
Diffstat (limited to 'security/ssh2')
-rw-r--r--security/ssh2/Makefile4
-rw-r--r--security/ssh2/files/sshd.sh27
2 files changed, 29 insertions, 2 deletions
diff --git a/security/ssh2/Makefile b/security/ssh2/Makefile
index 13bc11c98b9c..aed389b84676 100644
--- a/security/ssh2/Makefile
+++ b/security/ssh2/Makefile
@@ -101,8 +101,8 @@ post-install:
#
@if [ ! -f ${PREFIX}/etc/rc.d/sshd.sh ]; then \
${ECHO} "Installing ${PREFIX}/etc/rc.d/sshd.sh startup file."; \
- ${ECHO} "#!/bin/sh" > ${PREFIX}/etc/rc.d/sshd.sh; \
- ${ECHO} "[ -x ${PREFIX}/sbin/sshd ] && ${PREFIX}/sbin/sshd && ${ECHO} -n ' sshd'" >> ${PREFIX}/etc/rc.d/sshd.sh; \
+ ${SED} -e 's+!!PREFIX!!+${PREFIX}+' < ${FILESDIR}/sshd.sh \
+ > ${PREFIX}/etc/rc.d/sshd.sh
${CHMOD} 751 ${PREFIX}/etc/rc.d/sshd.sh; \
fi
diff --git a/security/ssh2/files/sshd.sh b/security/ssh2/files/sshd.sh
new file mode 100644
index 000000000000..dd882003037c
--- /dev/null
+++ b/security/ssh2/files/sshd.sh
@@ -0,0 +1,27 @@
+#!/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
+ ;;
+ -h)
+ echo "Usage: `basename $0` { start | stop | restart }"
+ ;;
+ *)
+ !!PREFIX!!/sbin/sshd
+ echo -n ' sshd'
+ ;;
+esac