diff options
author | root <root@rshg054.dnsready.net> | 2012-06-08 19:39:26 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-06-08 19:39:26 +0000 |
commit | 63bd66056e59c02a988bf17876bd72e27bb4dc8b (patch) | |
tree | 9dc5a47228611569e90bbdf40b10943f0e5fc5aa /extra/fetchmail | |
parent | 8735a5c54cf26dd5b5b686850f800a4aed49ff78 (diff) |
Fri Jun 8 19:39:26 UTC 2012
Diffstat (limited to 'extra/fetchmail')
-rw-r--r-- | extra/fetchmail/PKGBUILD | 20 | ||||
-rw-r--r-- | extra/fetchmail/fetchmail.install | 6 | ||||
-rw-r--r-- | extra/fetchmail/fetchmail.rc | 6 | ||||
-rw-r--r-- | extra/fetchmail/fetchmail.service | 12 | ||||
-rw-r--r-- | extra/fetchmail/fetchmail.tmpfiles | 1 |
5 files changed, 33 insertions, 12 deletions
diff --git a/extra/fetchmail/PKGBUILD b/extra/fetchmail/PKGBUILD index 7dcccc1c7..84c734b5b 100644 --- a/extra/fetchmail/PKGBUILD +++ b/extra/fetchmail/PKGBUILD @@ -1,9 +1,8 @@ -# $Id: PKGBUILD 153691 2012-03-18 02:01:54Z eric $ -# Maintainer: Aaron Griffin <aaron@archlinux.org> +# $Id: PKGBUILD 160935 2012-06-07 06:29:24Z pierre $ pkgname=fetchmail pkgver=6.3.21 -pkgrel=3 +pkgrel=4 pkgdesc="A remote-mail retrieval utility" arch=('i686' 'x86_64') url="http://fetchmail.berlios.de/" @@ -14,13 +13,16 @@ optdepends=('tk: for using fetchmailconf' 'python2: for using fetchmailconf') backup=('etc/conf.d/fetchmail') options=('!makeflags') -install=fetchmail.install -source=(http://downloads.sourceforge.net/$pkgname.berlios/${pkgname}-${pkgver}.tar.xz{,.asc} - fetchmail.rc fetchmail.conf) +install='fetchmail.install' +source=("http://downloads.sourceforge.net/$pkgname.berlios/${pkgname}-${pkgver}.tar.xz" + "http://downloads.sourceforge.net/$pkgname.berlios/${pkgname}-${pkgver}.tar.xz.asc" + 'fetchmail.rc' 'fetchmail.conf' 'fetchmail.tmpfiles' 'fetchmail.service') sha1sums=('4f1e5f2e1a616d4007da1de9c976c2c1fb5dcb81' 'bc8c68ec0d71b97d3168981cbaa4b04ab8e56059' - '910ec21ad0a619db67e4665189dc46d2a0634ea5' - '30401729386d6f774c6c36ab8530842166de54a8') + 'fc25180f1add26df0a3bdaac03fd9d2e3473ff88' + '30401729386d6f774c6c36ab8530842166de54a8' + '199ba749c829f22286c34aabcf8b7dd5bbd7c0e6' + '11ff81fc8363a54099880da18634b0d1ecf9fa82') build() { cd "${srcdir}/${pkgname}-${pkgver}" @@ -35,4 +37,6 @@ package() { install -Dm755 "${srcdir}/fetchmail.rc" "${pkgdir}/etc/rc.d/fetchmail" install -Dm644 "${srcdir}/fetchmail.conf" "${pkgdir}/etc/conf.d/fetchmail" install -d -o 90 -g nobody "${pkgdir}/var/lib/fetchmail" + install -D -m644 ${srcdir}/fetchmail.tmpfiles ${pkgdir}/usr/lib/tmpfiles.d/fetchmail.conf + install -D -m644 ${srcdir}/fetchmail.service ${pkgdir}/usr/lib/systemd/system/fetchmail.service } diff --git a/extra/fetchmail/fetchmail.install b/extra/fetchmail/fetchmail.install index 0b1cc6ae3..81b374c57 100644 --- a/extra/fetchmail/fetchmail.install +++ b/extra/fetchmail/fetchmail.install @@ -4,6 +4,9 @@ post_install() { echo "then 'chown fetchmail /etc/fetchmailrc'" getent passwd fetchmail >/dev/null || usr/sbin/useradd -u 90 -g nobody \ -d '/var/lib/fetchmail' -c 'Fetchmail daemon' -s /bin/false fetchmail + if [[ ! -d run/fetchmail ]]; then + usr/bin/systemd-tmpfiles --create usr/lib/tmpfiles.d/fetchmail.conf + fi } post_upgrade() { @@ -13,6 +16,9 @@ post_upgrade() { if [ "$(vercmp $2 6.3.19-3)" -lt 0 ] ; then usermod -d '/var/lib/fetchmail' -s /bin/false fetchmail fi + if [[ ! -d run/fetchmail ]]; then + usr/bin/systemd-tmpfiles --create usr/lib/tmpfiles.d/fetchmail.conf + fi } pre_remove() { diff --git a/extra/fetchmail/fetchmail.rc b/extra/fetchmail/fetchmail.rc index 6d453a223..4d8b98d40 100644 --- a/extra/fetchmail/fetchmail.rc +++ b/extra/fetchmail/fetchmail.rc @@ -2,15 +2,14 @@ . /etc/rc.conf . /etc/rc.d/functions -[ -f /etc/conf.d/fetchmail ] && . /etc/conf.d/fetchmail +. /etc/conf.d/fetchmail PID=`pidof -o %PPID /usr/bin/fetchmail` case "$1" in start) stat_busy "Starting fetchmail" - [ ! -d /var/run/fetchmail ] && install -d -o fetchmail -g nobody -m700 /var/run/fetchmail [ -z "$PID" ] && - su -c "/usr/bin/fetchmail -d $INTERVAL -f $CONFIG" -s /bin/sh fetchmail + su -c "/usr/bin/fetchmail -d $INTERVAL -f $CONFIG" -s /bin/sh fetchmail if [ $? -gt 0 ]; then stat_fail else @@ -24,7 +23,6 @@ case "$1" in if [ $? -gt 0 ]; then stat_fail else - rm -f /var/run/fetchmail.pid rm_daemon fetchmail stat_done fi diff --git a/extra/fetchmail/fetchmail.service b/extra/fetchmail/fetchmail.service new file mode 100644 index 000000000..3e7da7545 --- /dev/null +++ b/extra/fetchmail/fetchmail.service @@ -0,0 +1,12 @@ +[Unit] +Description=A remote-mail retrieval utility +After=network.target + +[Service] +User=fetchmail +EnvironmentFile=/etc/conf.d/fetchmail +ExecStart=/usr/bin/fetchmail -d ${INTERVAL} -f ${CONFIG} +RestartSec=1 + +[Install] +WantedBy=multi-user.target diff --git a/extra/fetchmail/fetchmail.tmpfiles b/extra/fetchmail/fetchmail.tmpfiles new file mode 100644 index 000000000..07945f876 --- /dev/null +++ b/extra/fetchmail/fetchmail.tmpfiles @@ -0,0 +1 @@ +d /run/fetchmail 700 fetchmail nobody |