summaryrefslogtreecommitdiff
path: root/pcr/mediatomb/mediatomb.install
diff options
context:
space:
mode:
authorAurélien DESBRIÈRES <aurelien@hackers.camp>2014-06-04 07:40:19 +0200
committerAurélien DESBRIÈRES <aurelien@hackers.camp>2014-06-04 07:40:19 +0200
commit9947a5c08c19ac6c6096aa9942805b686566b411 (patch)
treeb64123613081db2cc816496e2ba1700b7323d6d8 /pcr/mediatomb/mediatomb.install
parentb3c5fd72f793725b6e90ab8a3b78d73bb81599ee (diff)
downloadabslibre-9947a5c08c19ac6c6096aa9942805b686566b411.tar.gz
abslibre-9947a5c08c19ac6c6096aa9942805b686566b411.tar.bz2
abslibre-9947a5c08c19ac6c6096aa9942805b686566b411.zip
mediatomb
Diffstat (limited to 'pcr/mediatomb/mediatomb.install')
-rw-r--r--pcr/mediatomb/mediatomb.install15
1 files changed, 13 insertions, 2 deletions
diff --git a/pcr/mediatomb/mediatomb.install b/pcr/mediatomb/mediatomb.install
index 56f6ef92c..27f71d5a4 100644
--- a/pcr/mediatomb/mediatomb.install
+++ b/pcr/mediatomb/mediatomb.install
@@ -1,9 +1,20 @@
post_install() {
+ post_upgrade
+ passwd -l mediatomb &>/dev/null
echo 'Warning: the MediaTomb web interface exposes your filesystem to the network'
echo 'For maximum security, set <ui enabled="no"> in your MediaTomb config file'
}
post_upgrade() {
- # TODO: disable next update
- post_install
+ # create user/group that the daemon will run as by default, do not delete this on uninstall, as it will own files
+ getent group mediatomb >/dev/null || groupadd -g 241 mediatomb &>/dev/null
+ getent passwd mediatomb >/dev/null || useradd -c 'Mediatomb DLNA Server' -u 241 -g mediatomb -b '/var/lib' -m -s /bin/false mediatomb &>/dev/null
+
+ echo 'Attention: By default, MediaTomb now runs as its own user: mediatomb.'
+ echo 'Ensuring ownership of /var/lib/mediatomb is mediatomb:mediatomb...'
+ chown -R mediatomb:mediatomb /var/lib/mediatomb &>/dev/null
+ echo
+ echo 'Please note that the old rc script has been replaced with systemd service files.'
+ echo
}
+