summaryrefslogtreecommitdiff
path: root/system/redis/doinst.sh
diff options
context:
space:
mode:
Diffstat (limited to 'system/redis/doinst.sh')
-rw-r--r--system/redis/doinst.sh15
1 files changed, 14 insertions, 1 deletions
diff --git a/system/redis/doinst.sh b/system/redis/doinst.sh
index de6501f387..723cedbc2c 100644
--- a/system/redis/doinst.sh
+++ b/system/redis/doinst.sh
@@ -10,5 +10,18 @@ config() {
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
-config etc/redis.conf.new
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+
+config etc/redis.conf.new
+config etc/logrotate.d/redis.new
+preserve_perms etc/rc.d/rc.redis.new