aboutsummaryrefslogtreecommitdiffstats
path: root/main/fetchmail/fetchmail.initd
diff options
context:
space:
mode:
authorDaniele Coli <danielsan.dani@gmail.com>2016-02-14 12:10:18 +0100
committerTimo Teräs <timo.teras@iki.fi>2016-02-22 14:20:26 +0000
commit0b87fe1b7d417dad80a48b3d7743c37cf47cb943 (patch)
treeebc38dbc63d661902d7a4a8068c7f09bd38407ed /main/fetchmail/fetchmail.initd
parent2e88ee6aebf661b9ea221e5dd3e251535eaba6f6 (diff)
downloadaports-0b87fe1b7d417dad80a48b3d7743c37cf47cb943.tar.bz2
aports-0b87fe1b7d417dad80a48b3d7743c37cf47cb943.tar.xz
main/fetchmail: Added description to init.d script and moved configuration options to confd
Added description to init.d script in order to make it compliant with rc-system and avoid annoying warning messages on syslog. Moved configuration file path and startup options to confd file.
Diffstat (limited to 'main/fetchmail/fetchmail.initd')
-rwxr-xr-xmain/fetchmail/fetchmail.initd10
1 files changed, 6 insertions, 4 deletions
diff --git a/main/fetchmail/fetchmail.initd b/main/fetchmail/fetchmail.initd
index 8fd5adf0a..ad826ec85 100755
--- a/main/fetchmail/fetchmail.initd
+++ b/main/fetchmail/fetchmail.initd
@@ -1,5 +1,7 @@
#!/sbin/openrc-run
+description="Remote mail retrieval and forwarding"
+
pidfile=/var/run/fetchmail/fetchmail.pid
depend() {
@@ -9,8 +11,8 @@ depend() {
}
checkconfig() {
- if [ ! -f /etc/fetchmailrc ]; then
- eerror "Configuration file /etc/fetchmailrc not found"
+ if [ ! -f "${CFGFILE}" ]; then
+ eerror "Configuration file ${CFGFILE} not found"
return 1
fi
}
@@ -22,8 +24,8 @@ start() {
ebegin "Starting fetchmail"
start-stop-daemon --start --quiet \
--user fetchmail --exec /usr/bin/fetchmail \
- -- -d ${polling_period:-300} -f /etc/fetchmailrc \
- --pidfile ${pidfile} -i /var/lib/fetchmail/.fetchids
+ --pidfile ${pidfile} -i /var/lib/fetchmail/.fetchids \
+ -- -f "${CFGFILE}" ${FETCHMAIL_OPTS}
eend ${?}
}