diff options
author | Daniele Coli <danielsan.dani@gmail.com> | 2016-02-14 12:10:18 +0100 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2016-02-22 14:20:26 +0000 |
commit | 0b87fe1b7d417dad80a48b3d7743c37cf47cb943 (patch) | |
tree | ebc38dbc63d661902d7a4a8068c7f09bd38407ed /main/fetchmail | |
parent | 2e88ee6aebf661b9ea221e5dd3e251535eaba6f6 (diff) | |
download | aports-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')
-rw-r--r-- | main/fetchmail/APKBUILD | 19 | ||||
-rw-r--r-- | main/fetchmail/fetchmail.confd | 5 | ||||
-rwxr-xr-x | main/fetchmail/fetchmail.initd | 10 |
3 files changed, 23 insertions, 11 deletions
diff --git a/main/fetchmail/APKBUILD b/main/fetchmail/APKBUILD index 935b2a27cd..bcec2817ab 100644 --- a/main/fetchmail/APKBUILD +++ b/main/fetchmail/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=fetchmail pkgver=6.3.26 -pkgrel=5 +pkgrel=6 pkgdesc="A remote-mail retrieval and forwarding utility" url="http://www.fetchmail.info/" arch="all" @@ -13,8 +13,9 @@ pkggroups="fetchmail" makedepends="openssl-dev python" install="fetchmail.pre-install" subpackages="$pkgname-doc fetchmailconf" -source="http://downloads.sourceforge.net/project/${pkgname}/branch_6.3/fetchmail-${pkgver}.tar.xz - fetchmail.initd" +source="http://downloads.sourceforge.net/project/${pkgname}/branch_6.3/${pkgname}-${pkgver}.tar.xz + $pkgname.initd + $pkgname.confd" _builddir="$srcdir/$pkgname-$pkgver" prepare() { @@ -41,7 +42,8 @@ build() { package() { cd "$_builddir" make DESTDIR="$pkgdir" install - install -Dm755 "$srcdir"/fetchmail.initd "$pkgdir"/etc/init.d/fetchmail + install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname + install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname install -o fetchmail -g fetchmail -d "$pkgdir"/var/lib/fetchmail \ "$pkgdir"/var/run/fetchmail } @@ -57,8 +59,11 @@ fetchmailconf() { } md5sums="61b66faad044afa26e142bb1791aa2b3 fetchmail-6.3.26.tar.xz -6beab7b7731b3d321904e2a8ec948121 fetchmail.initd" +482cbb5f67bedaeb3ed559f6671d3d3d fetchmail.initd +0203136e64395c8411b01d75407d1adc fetchmail.confd" sha256sums="79b4c54cdbaf02c1a9a691d9948fcb1a77a1591a813e904283a8b614b757e850 fetchmail-6.3.26.tar.xz -c97185a8c1944574025b83ca4fc78f76330881d7e6ea209caf6962913ad66ffe fetchmail.initd" +ec00bbe1e2e8932c2fada56aea805cf537b775e804bac1d8794e07659291e9d5 fetchmail.initd +6343137640a25b115f015f41640bb498a6ebba471caa9374718364616aef3f85 fetchmail.confd" sha512sums="8e0a2484e60eaf6c0231e2599e10fec6d207fa1c0fa02ec99b3ef9aea00b6d87275434e79470a25f06e358cdd4a293f9c46a82dd128fe733a99c85144e6caa63 fetchmail-6.3.26.tar.xz -83128465a2e2e0df4ddd589cc7644e63ce013dee36196aa757b839edd5ec36775fc48fedd8c88ad51a8bb882bbfa573fff69546bbca84718ac9c1b915f35ff0a fetchmail.initd" +989127859c91eaec9bfa38dd873f141b0561cbe08d9ac4ab700abe612950fc4d61ec9670becf0d432a46c4d1558a2fd65f62f84e79cea9387ec1d377dacaecce fetchmail.initd +6f031ec6bd4a3ae53cd04fbd8470f4d10bd46ca29cabffa634a6801aa2e7707169855fbc045ced3c9a69523e694511a3f076b611678143e49339c8ccac98074e fetchmail.confd" diff --git a/main/fetchmail/fetchmail.confd b/main/fetchmail/fetchmail.confd new file mode 100644 index 0000000000..baa1a4c2af --- /dev/null +++ b/main/fetchmail/fetchmail.confd @@ -0,0 +1,5 @@ +# /etc/conf.d/fetchmail: config file for /etc/init.d/fetchmail + +# See the fetchmail(1) man page for possible options to put here. +CFGFILE="/etc/fetchmailrc" +FETCHMAIL_OPTS="-d ${polling_period:-300}" diff --git a/main/fetchmail/fetchmail.initd b/main/fetchmail/fetchmail.initd index 8fd5adf0ac..ad826ec850 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 ${?} } |