From dc8249c3e1d9df1db1c3cbe4adb65b916cfe19d0 Mon Sep 17 00:00:00 2001 From: maxice8 Date: Sat, 26 Jan 2019 20:44:34 -0200 Subject: [PATCH] redis: simplify directory creation --- srcpkgs/redis/files/redis/run | 9 +-------- srcpkgs/redis/template | 6 ++++-- 2 files changed, 5 insertions(+), 10 deletions(-) mode change 100755 => 100644 srcpkgs/redis/files/redis/run diff --git a/srcpkgs/redis/files/redis/run b/srcpkgs/redis/files/redis/run old mode 100755 new mode 100644 index 1086692a79..9ce7366eb7 --- a/srcpkgs/redis/files/redis/run +++ b/srcpkgs/redis/files/redis/run @@ -1,10 +1,3 @@ #!/bin/sh -if [ ! -d /var/lib/redis ]; then - mkdir -m0700 -p /var/lib/redis -fi -chown redis:redis /var/lib/redis -if [ ! -d /run/redis ]; then - mkdir -m0750 -p /run/redis -fi -chown redis:redis /run/redis +install -d -m0750 -o redis -g redis /run/redis exec chpst -u redis:redis redis-server /etc/redis/redis.conf > /dev/null diff --git a/srcpkgs/redis/template b/srcpkgs/redis/template index c5f0f27e76..5c84f695a9 100644 --- a/srcpkgs/redis/template +++ b/srcpkgs/redis/template @@ -1,7 +1,7 @@ # Template file for 'redis' pkgname=redis version=5.0.3 -revision=1 +revision=2 makedepends="jemalloc-devel libatomic-devel" checkdepends="tcl-devel" short_desc="Advanced key-value store" @@ -13,9 +13,11 @@ distfiles="http://download.redis.io/releases/${pkgname}-${version}.tar.gz" checksum=e290b4ddf817b26254a74d5d564095b11f9cd20d8f165459efa53eb63cd93e02 system_accounts="redis" -redis_homedir=/var/lib/redis +redis_homedir="/var/lib/redis" conf_files="/etc/redis/redis.conf" +make_dirs="/var/lib/redis 0700 redis redis" + do_configure() { sed -i \ -e "s|^# bind 127.0.0.1|bind 127.0.0.1|" \