diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-07-30 19:17:26 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-07-30 19:19:48 +0200 |
commit | ea95115b072ce66d1354d5908493e83101f44f4f (patch) | |
tree | d5e5a1d1cb9c04ff95afbc54c752ada57a01766a | |
parent | c1c8c5a78a149b9954517df485d61e66a73a93a4 (diff) | |
download | aports-ea95115b072ce66d1354d5908493e83101f44f4f.tar.bz2 aports-ea95115b072ce66d1354d5908493e83101f44f4f.tar.xz |
main/redis: create /run/redis if OpenRC is not present
Fixes 9146 <https://bugs.alpinelinux.org/issues/9146>
Fixes 9113 <https://bugs.alpinelinux.org/issues/9113>
-rw-r--r-- | main/redis/APKBUILD | 4 | ||||
-rw-r--r-- | main/redis/redis.post-install | 11 |
2 files changed, 13 insertions, 2 deletions
diff --git a/main/redis/APKBUILD b/main/redis/APKBUILD index 7a3c8aec1e..c3bc1de909 100644 --- a/main/redis/APKBUILD +++ b/main/redis/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: TBK <alpine@jjtc.eu> pkgname=redis pkgver=4.0.10 -pkgrel=0 +pkgrel=1 pkgdesc="Advanced key-value store" url="https://redis.io/" arch="all" @@ -11,7 +11,7 @@ pkgusers="redis" pkggroups="redis" makedepends="linux-headers" checkdepends="tcl procps" -install="$pkgname.pre-install" +install="$pkgname.pre-install $pkgname.post-install" subpackages="$pkgname-openrc" source="http://download.redis.io/releases/$pkgname-$pkgver.tar.gz makefile-dont-duplicate-binary.patch diff --git a/main/redis/redis.post-install b/main/redis/redis.post-install new file mode 100644 index 0000000000..a0cfbe51ee --- /dev/null +++ b/main/redis/redis.post-install @@ -0,0 +1,11 @@ +#!/bin/sh + +# Create directory for the socket if OpenRC is not present (e.g. in container). +# It's conditioned using post-install script specifically to avoid easily +# overlookable mistakes in the init script (service working until the +# first restart). +if ! [ -e /sbin/openrc ]; then + install -d -m 755 -o redis -g redis /run/redis +fi + +exit 0 |