diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-05-29 09:32:25 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-05-29 09:32:25 +0000 |
commit | e504121aac389456ee7383f44e6d44e54631e01e (patch) | |
tree | 946da14960d25db20c5731754efff397b3ddfe87 /extra | |
parent | e318f7eac680691aa974f0860075cadb69036b43 (diff) |
extra/fetchmail: create fetchmail user and fix init.d script
Diffstat (limited to 'extra')
-rw-r--r-- | extra/fetchmail/APKBUILD | 14 | ||||
-rwxr-xr-x | extra/fetchmail/fetchmail.initd | 11 | ||||
-rw-r--r-- | extra/fetchmail/fetchmail.post-install | 3 | ||||
-rw-r--r-- | extra/fetchmail/fetchmail.pre-install | 4 |
4 files changed, 23 insertions, 9 deletions
diff --git a/extra/fetchmail/APKBUILD b/extra/fetchmail/APKBUILD index e04e23c3495..1431ac77767 100644 --- a/extra/fetchmail/APKBUILD +++ b/extra/fetchmail/APKBUILD @@ -2,16 +2,17 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=fetchmail pkgver=6.3.9 -pkgrel=0 +pkgrel=1 pkgdesc="A remote-mail retrieval and forwarding utility" url="http://fetchmail.berlios.de/" license="GPL" depends="openssl uclibc" -makedepends="openssl-dev" -install= +makedepends="openssl-dev python" +install="fetchmail.pre-install fetchmail.post-install" subpackages="$pkgname-doc fetchmailconf" source="http://download.berlios.de/fetchmail/$pkgname-$pkgver.tar.bz2 - fetchmail.initrd" + $install + fetchmail.initd" build() { cd "$srcdir/$pkgname-$pkgver" @@ -24,6 +25,7 @@ build() { make || return 1 make DESTDIR="$pkgdir" install install -Dm755 $srcdir/fetchmail.initrd "$pkgdir"/etc/init.d/fetchmail + install -d "$pkgdir"/var/lib/fetchmail } fetchmailconf() { @@ -36,4 +38,6 @@ fetchmailconf() { } md5sums="72c20ad2b9629f1a109668b05a84d823 fetchmail-6.3.9.tar.bz2 -b6b95767279d77c98acdc3aa4d00ec89 fetchmail.initrd" +5a2fc8e8b3115fe2b9bf23503fb8f0a4 fetchmail.pre-install +e27237ed73ad183ddd06dfd5e3dd0da7 fetchmail.post-install +9a64c2b77d1a03a1eb8648a32d46b2c5 fetchmail.initd" diff --git a/extra/fetchmail/fetchmail.initd b/extra/fetchmail/fetchmail.initd index 30eea503695..4646fa4ccaf 100755 --- a/extra/fetchmail/fetchmail.initd +++ b/extra/fetchmail/fetchmail.initd @@ -1,5 +1,7 @@ #!/sbin/runscript +pidfile=/var/run/fetchmail/fetchmail.pid + depend() { need net use mta @@ -16,15 +18,16 @@ start() { checkconfig || return 1 ebegin "Starting fetchmail" - start-stop-daemon --start --quiet --exec /usr/bin/fetchmail \ - --chuid ${USER:-fetchmail}:${GROUP:-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 ${?} } diff --git a/extra/fetchmail/fetchmail.post-install b/extra/fetchmail/fetchmail.post-install new file mode 100644 index 00000000000..9ca24ddcd86 --- /dev/null +++ b/extra/fetchmail/fetchmail.post-install @@ -0,0 +1,3 @@ +#!/bin/sh + +chown fetchmail:fetchmail /var/lib/fetchmail diff --git a/extra/fetchmail/fetchmail.pre-install b/extra/fetchmail/fetchmail.pre-install new file mode 100644 index 00000000000..4a1b630e008 --- /dev/null +++ b/extra/fetchmail/fetchmail.pre-install @@ -0,0 +1,4 @@ +#!/bin/sh + +adduser -H -h /var/lib/fetchmail -s /bin/false -D fetchmail 2>/dev/null +exit 0 |