Added
Link Here
|
1 |
#!/bin/sh |
2 |
# |
3 |
# $FreeBSD: ports/ftp/moftpd/files/moftpd.sh,v 1.2 2006/02/20 20:47:00 dougb Exp $ |
4 |
# |
5 |
|
6 |
# PROVIDE: moftpd |
7 |
# REQUIRE: NETWORKING SERVERS |
8 |
# BEFORE: DAEMON |
9 |
# KEYWORD: shutdown |
10 |
|
11 |
# |
12 |
# Add the following lines to /etc/rc.conf to enable moftpd: |
13 |
# moftpd_enable (bool): Set to "NO" by default. |
14 |
# moftpdlimits_enable (bool):Set to "NO" by default. |
15 |
# Set it to yes to run `limits $limits_args` |
16 |
# just before moftpd starts. |
17 |
# moftpd_flags (str): Set to "" by default. |
18 |
# Extra flags passed to start command |
19 |
# moftpdlimits_args (str): Default to "-e -C daemon" |
20 |
# Arguments of pre-start limits run. |
21 |
# |
22 |
. %%RC_SUBR%% |
23 |
|
24 |
name="moftpd" |
25 |
rcvar=`set_rcvar` |
26 |
|
27 |
command="%%PREFIX%%/sbin/moftpd" |
28 |
pidfile="/var/run/moftpd.pid" |
29 |
required_files=%%PREFIX%%/etc/moftpd.conf |
30 |
|
31 |
load_rc_config $name |
32 |
|
33 |
[ -z "$moftpd_enable" ] && moftpd_enable="NO" |
34 |
[ -z "$moftpd_flags" ] && moftpd_flags="" |
35 |
[ -z "$moftpdlimits_enable" ] && moftpdlimits_enable="NO" |
36 |
[ -z "$moftpdlimits_args" ] && moftpdlimits_args="-e -C daemon" |
37 |
|
38 |
|
39 |
checkyesno moftpdlimits_enable && \ |
40 |
start_precmd="eval `/usr/bin/limits ${moftpdlimits_args}` 2>/dev/null" |
41 |
|
42 |
run_rc_command "$1" |