summaryrefslogtreecommitdiffstats
path: root/multimedia/minidlna/doinst.sh
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/minidlna/doinst.sh')
-rw-r--r--multimedia/minidlna/doinst.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/multimedia/minidlna/doinst.sh b/multimedia/minidlna/doinst.sh
index 7626d3a507..15f3e3fff1 100644
--- a/multimedia/minidlna/doinst.sh
+++ b/multimedia/minidlna/doinst.sh
@@ -11,4 +11,17 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
+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
+ mv ${NEW} ${OLD}
+}
+
+preserve_perms etc/rc.d/rc.minidlna.new
config etc/minidlna.conf.new
+config etc/logrotate.d/minidlna.new