summarylogtreecommitdiffstats
path: root/mediatomb.install
diff options
context:
space:
mode:
authorSébastien Leduc2015-08-18 16:43:30 +0200
committerSébastien Leduc2015-08-18 16:43:30 +0200
commit0b4d0b210d81b53911fa3f0442302f7a04952f7b (patch)
tree892cba393ff29220700351f7f1c8369a372d4657 /mediatomb.install
downloadaur-0b4d0b210d81b53911fa3f0442302f7a04952f7b.tar.gz
Initial commit (0.12.1-11 + fix of mediatomb-mariadb.service as suggested in the comments of the mediatomb pkg)
Diffstat (limited to 'mediatomb.install')
-rw-r--r--mediatomb.install17
1 files changed, 17 insertions, 0 deletions
diff --git a/mediatomb.install b/mediatomb.install
new file mode 100644
index 000000000000..74ce78e9d570
--- /dev/null
+++ b/mediatomb.install
@@ -0,0 +1,17 @@
+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() {
+ # 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
+
+}