--- /usr/portage/net-mail/fetchmail/files/fetchmail.old 2009-02-19 15:46:18.000000000 -0500 +++ /usr/portage/net-mail/fetchmail/files/fetchmail 2009-02-19 17:27:47.000000000 -0500 @@ -1,5 +1,7 @@ #!/sbin/runscript +pidfile=/var/run/fetchmail/fetchmail.pid + depend() { need net use mta @@ -16,14 +18,16 @@ checkconfig || return 1 ebegin "Starting fetchmail" - start-stop-daemon --start --quiet --exec /usr/bin/fetchmail \ - -- -d ${polling_period} -f /etc/fetchmailrc + start-stop-daemon --start --quiet \ + --chuid fetchmail --exec /usr/bin/fetchmail \ + -- -d ${polling_period} -f /etc/fetchmailrc \ + --pidfile ${pidfile} -i /var/lib/fetchmail/.fetchids eend ${?} } stop() { ebegin "Stopping fetchmail" - start-stop-daemon --stop --quiet --pidfile /var/run/fetchmail.pid + start-stop-daemon --stop --quiet --pidfile ${pidfile} eend ${?} }