diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-10-12 20:30:52 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-10-12 20:30:52 +0000 |
commit | 8b5ba1c39acd9bdf64c55a1407021111969a4289 (patch) | |
tree | 70d01b6f6b8000a3310692331957840684a8ac29 /contrib/solaris/sshd-initscript.in | |
parent | 4a820ea750ce79be709ca8c4b11edf39e07b2676 (diff) |
- (bal) First wave of contrib/solaris/ package upgrades. Still more
work needs to be done, but it is a 190% better then the stuff we
had before!
Diffstat (limited to 'contrib/solaris/sshd-initscript.in')
-rwxr-xr-x | contrib/solaris/sshd-initscript.in | 50 |
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 | |||
5 | PIDFILE="%%PIDDIR%%/sshd.pid" | ||
6 | PGREP="/usr/bin/pgrep" | ||
7 | HEAD="/usr/bin/head" | ||
8 | XARGS="/usr/bin/xargs" | ||
9 | KILL="/usr/bin/kill" | ||
10 | |||
11 | killproc() { | ||
12 | _procname=$1 | ||
13 | _signal=$2 | ||
14 | ${PGREP} ${_procname} | ${HEAD} -1 | ${XARGS} -t -I {} ${KILL} -${_signal} {} | ||
15 | } | ||
16 | |||
17 | case $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 | ;; | ||
50 | esac | ||