summaryrefslogtreecommitdiff
path: root/community/chrony
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2014-03-25 03:59:45 +0000
committerNicolás Reynolds <fauno@endefensadelsl.org>2014-03-25 03:59:45 +0000
commitec963aec4666ff7087ae150cb84398533a78f296 (patch)
tree4da354e279473e5bd24dccdc93e816b2ebbe076f /community/chrony
parentf28fb29dd903558bdb2765f573eaf149897e7d1c (diff)
Tue Mar 25 03:55:20 UTC 2014
Diffstat (limited to 'community/chrony')
-rw-r--r--community/chrony/PKGBUILD9
-rw-r--r--community/chrony/chrony.install18
-rw-r--r--community/chrony/service2
3 files changed, 25 insertions, 4 deletions
diff --git a/community/chrony/PKGBUILD b/community/chrony/PKGBUILD
index 926638dc2..4c7caea95 100644
--- a/community/chrony/PKGBUILD
+++ b/community/chrony/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 105122 2014-01-31 23:52:20Z thestinger $
+# $Id: PKGBUILD 108210 2014-03-24 21:36:00Z thestinger $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Daniel Micay <danielmicay@gmail.com>
# Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
@@ -9,7 +9,7 @@
pkgname=chrony
pkgver=1.29.1
-pkgrel=1
+pkgrel=2
pkgdesc='Lightweight NTP client and server'
arch=('i686' 'x86_64')
url="http://chrony.tuxfamily.org/"
@@ -19,8 +19,9 @@ depends=('readline' 'libcap')
backup=('etc/chrony.conf')
source=(http://download.tuxfamily.org/chrony/${pkgname}-${pkgver}.tar.gz
service)
+install=${pkgname}.install
sha256sums=('658c9bb4d8c8d8ec7d0908429aa266e5f8413ba86bd4acbfd2f9669f6065af27'
- 'bef4305fa7e5828e1a1fd43aa8e631f22f21902f6cdc2d3b5b41a57bd9a175dc')
+ '3c9d05aaba6c0bef43fd1923a6dd7ac5f9b9539d21efbd1fbe592b54dec8d493')
build() {
cd $pkgname-$pkgver
@@ -45,4 +46,6 @@ package() {
install -dm755 "$pkgdir/usr/lib/systemd/ntp-units.d"
echo "$pkgname.service" > "$pkgdir/usr/lib/systemd/ntp-units.d/$pkgname.list"
+
+ chown 183:183 "$pkgdir/var/lib/chrony"
}
diff --git a/community/chrony/chrony.install b/community/chrony/chrony.install
new file mode 100644
index 000000000..2badf6471
--- /dev/null
+++ b/community/chrony/chrony.install
@@ -0,0 +1,18 @@
+post_install() {
+ getent group chrony &>/dev/null || groupadd -g 183 chrony >/dev/null
+ getent passwd chrony &>/dev/null || useradd -u 183 -g chrony -d /var/lib/chrony -c 'Network Time Protocol' -s /bin/false chrony >/dev/null
+ true
+}
+
+post_upgrade() {
+ if [[ $(vercmp $2 1.29.1-2) -le 0 ]]; then
+ post_install
+ chown -R 183:183 /var/lib/chrony
+ fi
+}
+
+post_remove() {
+ getent passwd chrony &>/dev/null && userdel chrony >/dev/null
+ getent group chrony &>/dev/null && groupdel chrony >/dev/null
+ true
+}
diff --git a/community/chrony/service b/community/chrony/service
index 3a012ffac..8080dd7c2 100644
--- a/community/chrony/service
+++ b/community/chrony/service
@@ -4,7 +4,7 @@ After=network.target
[Service]
Type=forking
-ExecStart=/usr/bin/chronyd
+ExecStart=/usr/bin/chronyd -u chrony
PIDFile=/var/run/chronyd.pid
[Install]