|
Lines 3-24
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-ftp/oftpd/files/oftpd.rc6,v 1.4 2003/02/14 23:00:26 vapier Exp $ |
4 |
# $Header: /home/cvsroot/gentoo-x86/net-ftp/oftpd/files/oftpd.rc6,v 1.4 2003/02/14 23:00:26 vapier Exp $ |
| 5 |
|
5 |
|
|
|
6 |
#NB: Config is in /etc/conf.d/oftpd |
| 7 |
|
| 6 |
depend() { |
8 |
depend() { |
| 7 |
need net |
9 |
need net |
| 8 |
} |
10 |
} |
| 9 |
|
11 |
|
| 10 |
checkconfig() { |
12 |
checkconfig() { |
| 11 |
if [ -z "$FTPUSER" ] || [ -z "$FTPROOT" ] ; then |
13 |
if [ -z "$FTPUSER" ] || [ -z "$FTPROOT" ] ; then |
| 12 |
eerror "You need to setup FTPUSER and FTPROOT in /etc/rc.conf" |
14 |
eerror "You need to setup FTPUSER and FTPROOT in /etc/conf.d/oftpd" |
| 13 |
return 1 |
15 |
return 1 |
| 14 |
fi |
16 |
fi |
| 15 |
} |
17 |
} |
| 16 |
|
18 |
|
| 17 |
start() { |
19 |
start() { |
| 18 |
checkconfig || return 1 |
20 |
checkconfig || return 1 |
|
|
21 |
local params="" |
| 22 |
[ -n "$PORT" ] && params="$params -p $PORT" |
| 23 |
[ -n "$IFACE" ] && params="$params -i $IFACE" |
| 24 |
[ -n "$MAXCLIENTS" ] && params="$params -m $MAXCLIENTS" |
| 25 |
[ -n "$OFTPD_OPTS" ] && params="$params $OFTPD_OPTS" |
| 19 |
ebegin "Starting oftpd" |
26 |
ebegin "Starting oftpd" |
| 20 |
start-stop-daemon --start --quiet --exec /usr/sbin/oftpd \ |
27 |
start-stop-daemon --start --quiet --exec /usr/sbin/oftpd \ |
| 21 |
-- ${FTPUSER} ${FTPROOT} |
28 |
-- ${params} ${FTPUSER} ${FTPROOT} |
| 22 |
eend $? |
29 |
eend $? |
| 23 |
} |
30 |
} |
| 24 |
|
31 |
|