aboutsummaryrefslogtreecommitdiffstats
path: root/security/ssh2/files
diff options
context:
space:
mode:
authorWill Andrews <will@FreeBSD.org>2000-04-06 06:21:44 +0800
committerWill Andrews <will@FreeBSD.org>2000-04-06 06:21:44 +0800
commit810b23015a0381c37aaa2071cb7b425d30ff42e7 (patch)
tree49e7e7c2fc108456e79e92b75c5ad54f32df3dcb /security/ssh2/files
parentb11c4333de66b56faadbb9b76355499493ce9f8b (diff)
downloadfreebsd-ports-gnome-810b23015a0381c37aaa2071cb7b425d30ff42e7.tar.gz
freebsd-ports-gnome-810b23015a0381c37aaa2071cb7b425d30ff42e7.tar.zst
freebsd-ports-gnome-810b23015a0381c37aaa2071cb7b425d30ff42e7.zip
Add better sshd startup scripts; specifically, allow restarting and
stopping the server. Martti's submission did not include -h, which I added because if I had added the scripts the way he submitted them, the server wouldn't be started on startup. PR: 10196 Submitted by: Martti Kuparinen <martti.kuparinen@ericsson.com> Reviewed by: kris (partially) No response: maintainers (PR opened February 22, 1999)
Diffstat (limited to 'security/ssh2/files')
-rw-r--r--security/ssh2/files/sshd.sh27
1 files changed, 27 insertions, 0 deletions
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