summaryrefslogtreecommitdiff
path: root/contrib/solaris/sshd-initscript.in
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/solaris/sshd-initscript.in')
-rwxr-xr-xcontrib/solaris/sshd-initscript.in50
1 files changed, 0 insertions, 50 deletions
diff --git a/contrib/solaris/sshd-initscript.in b/contrib/solaris/sshd-initscript.in
deleted file mode 100755
index 886a51fba..000000000
--- a/contrib/solaris/sshd-initscript.in
+++ /dev/null
@@ -1,50 +0,0 @@
1#! /sbin/sh
2
3# SSHd startup/shutdown script, based on uucp script.
4
5PIDFILE="%%PIDDIR%%/sshd.pid"
6PGREP="/usr/bin/pgrep"
7HEAD="/usr/bin/head"
8XARGS="/usr/bin/xargs"
9KILL="/usr/bin/kill"
10
11killproc() {
12 _procname=$1
13 _signal=$2
14 ${PGREP} ${_procname} | ${HEAD} -1 | ${XARGS} -t -I {} ${KILL} -${_signal} {}
15}
16
17case $1 in
18'start')
19 /usr/local/sbin/sshd
20 ;;
21
22'stop')
23 if [ -r $PIDFILE -a ! -z ${PIDFILE} ]; then
24 PID=`cat ${PIDFILE}`
25 fi
26 if [ ${PID:=0} -gt 1 -a ! "X$PID" = "X " ]; then
27 /usr/bin/kill $PID
28 else
29 echo "Unable to read PID file, killing using alternate method"
30 killproc sshd TERM
31 fi
32 ;;
33
34'restart')
35 if [ -r $PIDFILE -a ! -z ${PIDFILE} ]; then
36 PID=`cat ${PIDFILE}`
37 fi
38 if [ ${PID:=0} -gt 1 -a ! "X$PID" = "X " ]; then
39 /usr/bin/kill -HUP $PID
40 else
41 echo "Unable to read PID file, trying alternate method"
42 killproc sshd HUP
43 /usr/local/sbin/sshd
44 fi
45 ;;
46
47*)
48 echo "usage: /etc/init.d/sshd {start|stop|restart}"
49 ;;
50esac