aboutsummaryrefslogtreecommitdiff
path: root/ftp/proftpd/files/proftpd.in
blob: fdfb93f0836b8357fb276cb354d9e964164df505 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/sh
#
# $FreeBSD$
#

# PROVIDE: proftpd
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown

#
# Add the following lines to /etc/rc.conf to enable proftpd:
#
# proftpd_enable="YES"
# proftpd_flags="<set as needed>"
#
# See proftpd(8) for flags
#

. /etc/rc.subr

name=proftpd
rcvar=proftpd_enable

load_rc_config $name

: ${proftpd_enable:="NO"}
: ${proftpd_config:="%%PREFIX%%/etc/proftpd.conf"}

command=%%PREFIX%%/sbin/proftpd
command_args="-c ${proftpd_config}"
pidfile=$(grep PidFile ${proftpd_config} | awk '{print($2)}')
required_files=${proftpd_config}

extra_commands="reload"
stop_postcmd=stop_postcmd
stop_postcmd()
{
  rm -f $pidfile
}

run_rc_command "$1"