summaryrefslogtreecommitdiff
path: root/mail/fetchmail/files/fetchmail.sh
blob: 09380f9fc4bf2a39944b84e03d378dff1fd4d857 (plain)
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
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: fetchmail.sh,v 1.2 2004/08/01 04:54:56 jlam Exp $
#
# PROVIDE: fetchmail
# REQUIRE: mail

if [ -f /etc/rc.subr ]; then
	. /etc/rc.subr
fi

name="fetchmail"
rcvar=$name
command="@PREFIX@/bin/${name}"
pidfile="/var/run/${name}.pid"
required_files="@PKG_SYSCONFDIR@/${name}.conf"
extra_commands="reload"
command_args="-f - < @PKG_SYSCONFDIR@/${name}.conf"

if [ -f /etc/rc.subr ]; then
	load_rc_config $name
	run_rc_command "$1"
else
	@ECHO@ -n ' ${name}'
	${command} ${fetchmail_flags} ${command_args}
fi