Lines 3-8
Link Here
|
3 |
# Distributed under the terms of the GNU General Public License, v2 or later |
3 |
# Distributed under the terms of the GNU General Public License, v2 or later |
4 |
# $Header: /home/cvsroot/gentoo-x86/net-misc/openssh/files/sshd.rc6,v 1.10 2003/06/01 04:37:45 lostlogic Exp $ |
4 |
# $Header: /home/cvsroot/gentoo-x86/net-misc/openssh/files/sshd.rc6,v 1.10 2003/06/01 04:37:45 lostlogic Exp $ |
5 |
|
5 |
|
|
|
6 |
DAEMONTOOLSDIR="/var/daemontools/sshd" |
6 |
|
7 |
|
7 |
depend() { |
8 |
depend() { |
8 |
use logger dns |
9 |
use logger dns |
Lines 36-50
Link Here
|
36 |
|
37 |
|
37 |
start() { |
38 |
start() { |
38 |
checkconfig || return 1 |
39 |
checkconfig || return 1 |
39 |
ebegin "Starting sshd" |
40 |
if [ -x /usr/bin/svc ] && [ -x "${DAEMONTOOLSDIR}/run" ] \ |
40 |
start-stop-daemon --start --quiet --pidfile /var/run/sshd.pid \ |
41 |
&& [ ! -f "${DAEMONTOOLSDIR}/noinit" ] |
41 |
--startas /usr/sbin/sshd |
42 |
then |
|
|
43 |
ebegin "Starting supervised sshd" |
44 |
/usr/bin/pgrphack /usr/bin/supervise "$DAEMONTOOLSDIR" | \ |
45 |
/usr/bin/pgrphack /usr/bin/supervise "$DAEMONTOOLSDIR"/log & |
46 |
else |
47 |
ebegin "Starting sshd" |
48 |
start-stop-daemon --start --quiet --pidfile /var/run/sshd.pid \ |
49 |
--startas /usr/sbin/sshd |
50 |
fi |
42 |
eend $? |
51 |
eend $? |
43 |
} |
52 |
} |
44 |
|
53 |
|
45 |
stop() { |
54 |
stop() { |
46 |
ebegin "Stopping sshd" |
55 |
ebegin "Stopping sshd" |
47 |
start-stop-daemon --stop --quiet --pidfile /var/run/sshd.pid |
56 |
if [ -x /usr/bin/svok ] && /usr/bin/svok "$DAEMONTOOLSDIR" |
|
|
57 |
then |
58 |
/usr/bin/svc -dx "$DAEMONTOOLSDIR" "$DAEMONTOOLSDIR"/log |
59 |
else |
60 |
start-stop-daemon --stop --quiet --pidfile /var/run/sshd.pid |
61 |
fi |
48 |
eend $? |
62 |
eend $? |
49 |
} |
63 |
} |
50 |
|
64 |
|
|
|
65 |
status() { |
66 |
if [ -x /usr/bin/svok ] && /usr/bin/svok "$DAEMONTOOLSDIR" |
67 |
then |
68 |
einfo `/usr/bin/svstat "$DAEMONTOOLSDIR"` |
69 |
einfo `/usr/bin/svstat "${DAEMONTOOLSDIR}/log"` |
70 |
fi |
71 |
} |