aboutsummaryrefslogtreecommitdiff
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
parent2e88ee6aebf661b9ea221e5dd3e251535eaba6f6 (diff)
downloadalpine_aports-0b87fe1b7d417dad80a48b3d7743c37cf47cb943.tar.bz2
alpine_aports-0b87fe1b7d417dad80a48b3d7743c37cf47cb943.tar.xz
alpine_aports-0b87fe1b7d417dad80a48b3d7743c37cf47cb943.zip
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.
-rw-r--r--main/fetchmail/APKBUILD19
-rw-r--r--main/fetchmail/fetchmail.confd5
-rwxr-xr-xmain/fetchmail/fetchmail.initd10
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 @@
2# Maintainer: Natanael Copa <ncopa@alpinelinux.org> 2# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
3pkgname=fetchmail 3pkgname=fetchmail
4pkgver=6.3.26 4pkgver=6.3.26
5pkgrel=5 5pkgrel=6
6pkgdesc="A remote-mail retrieval and forwarding utility" 6pkgdesc="A remote-mail retrieval and forwarding utility"
7url="http://www.fetchmail.info/" 7url="http://www.fetchmail.info/"
8arch="all" 8arch="all"
@@ -13,8 +13,9 @@ pkggroups="fetchmail"
13makedepends="openssl-dev python" 13makedepends="openssl-dev python"
14install="fetchmail.pre-install" 14install="fetchmail.pre-install"
15subpackages="$pkgname-doc fetchmailconf" 15subpackages="$pkgname-doc fetchmailconf"
16source="http://downloads.sourceforge.net/project/${pkgname}/branch_6.3/fetchmail-${pkgver}.tar.xz 16source="http://downloads.sourceforge.net/project/${pkgname}/branch_6.3/${pkgname}-${pkgver}.tar.xz
17 fetchmail.initd" 17 $pkgname.initd
18 $pkgname.confd"
18_builddir="$srcdir/$pkgname-$pkgver" 19_builddir="$srcdir/$pkgname-$pkgver"
19 20
20prepare() { 21prepare() {
@@ -41,7 +42,8 @@ build() {
41package() { 42package() {
42 cd "$_builddir" 43 cd "$_builddir"
43 make DESTDIR="$pkgdir" install 44 make DESTDIR="$pkgdir" install
44 install -Dm755 "$srcdir"/fetchmail.initd "$pkgdir"/etc/init.d/fetchmail 45 install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
46 install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
45 install -o fetchmail -g fetchmail -d "$pkgdir"/var/lib/fetchmail \ 47 install -o fetchmail -g fetchmail -d "$pkgdir"/var/lib/fetchmail \
46 "$pkgdir"/var/run/fetchmail 48 "$pkgdir"/var/run/fetchmail
47} 49}
@@ -57,8 +59,11 @@ fetchmailconf() {
57} 59}
58 60
59md5sums="61b66faad044afa26e142bb1791aa2b3 fetchmail-6.3.26.tar.xz 61md5sums="61b66faad044afa26e142bb1791aa2b3 fetchmail-6.3.26.tar.xz
606beab7b7731b3d321904e2a8ec948121 fetchmail.initd" 62482cbb5f67bedaeb3ed559f6671d3d3d fetchmail.initd
630203136e64395c8411b01d75407d1adc fetchmail.confd"
61sha256sums="79b4c54cdbaf02c1a9a691d9948fcb1a77a1591a813e904283a8b614b757e850 fetchmail-6.3.26.tar.xz 64sha256sums="79b4c54cdbaf02c1a9a691d9948fcb1a77a1591a813e904283a8b614b757e850 fetchmail-6.3.26.tar.xz
62c97185a8c1944574025b83ca4fc78f76330881d7e6ea209caf6962913ad66ffe fetchmail.initd" 65ec00bbe1e2e8932c2fada56aea805cf537b775e804bac1d8794e07659291e9d5 fetchmail.initd
666343137640a25b115f015f41640bb498a6ebba471caa9374718364616aef3f85 fetchmail.confd"
63sha512sums="8e0a2484e60eaf6c0231e2599e10fec6d207fa1c0fa02ec99b3ef9aea00b6d87275434e79470a25f06e358cdd4a293f9c46a82dd128fe733a99c85144e6caa63 fetchmail-6.3.26.tar.xz 67sha512sums="8e0a2484e60eaf6c0231e2599e10fec6d207fa1c0fa02ec99b3ef9aea00b6d87275434e79470a25f06e358cdd4a293f9c46a82dd128fe733a99c85144e6caa63 fetchmail-6.3.26.tar.xz
6483128465a2e2e0df4ddd589cc7644e63ce013dee36196aa757b839edd5ec36775fc48fedd8c88ad51a8bb882bbfa573fff69546bbca84718ac9c1b915f35ff0a fetchmail.initd" 68989127859c91eaec9bfa38dd873f141b0561cbe08d9ac4ab700abe612950fc4d61ec9670becf0d432a46c4d1558a2fd65f62f84e79cea9387ec1d377dacaecce fetchmail.initd
696f031ec6bd4a3ae53cd04fbd8470f4d10bd46ca29cabffa634a6801aa2e7707169855fbc045ced3c9a69523e694511a3f076b611678143e49339c8ccac98074e 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 @@
1# /etc/conf.d/fetchmail: config file for /etc/init.d/fetchmail
2
3# See the fetchmail(1) man page for possible options to put here.
4CFGFILE="/etc/fetchmailrc"
5FETCHMAIL_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 @@
1#!/sbin/openrc-run 1#!/sbin/openrc-run
2 2
3description="Remote mail retrieval and forwarding"
4
3pidfile=/var/run/fetchmail/fetchmail.pid 5pidfile=/var/run/fetchmail/fetchmail.pid
4 6
5depend() { 7depend() {
@@ -9,8 +11,8 @@ depend() {
9} 11}
10 12
11checkconfig() { 13checkconfig() {
12 if [ ! -f /etc/fetchmailrc ]; then 14 if [ ! -f "${CFGFILE}" ]; then
13 eerror "Configuration file /etc/fetchmailrc not found" 15 eerror "Configuration file ${CFGFILE} not found"
14 return 1 16 return 1
15 fi 17 fi
16} 18}
@@ -22,8 +24,8 @@ start() {
22 ebegin "Starting fetchmail" 24 ebegin "Starting fetchmail"
23 start-stop-daemon --start --quiet \ 25 start-stop-daemon --start --quiet \
24 --user fetchmail --exec /usr/bin/fetchmail \ 26 --user fetchmail --exec /usr/bin/fetchmail \
25 -- -d ${polling_period:-300} -f /etc/fetchmailrc \ 27 --pidfile ${pidfile} -i /var/lib/fetchmail/.fetchids \
26 --pidfile ${pidfile} -i /var/lib/fetchmail/.fetchids 28 -- -f "${CFGFILE}" ${FETCHMAIL_OPTS}
27 eend ${?} 29 eend ${?}
28} 30}
29 31