summaryrefslogtreecommitdiff
path: root/pcr/mediatomb/mediatomb.install
blob: cb343b45580c48a0ed74f330d069538c52157be1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
post_install() {
  systemd-sysusers mediatomb.conf
  install -dm700 -omediatomb -gmediatomb /var/lib/mediatomb

  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() {
  systemd-sysusers mediatomb.conf

  if [ $(vercmp $2 0.12.1-12) -lt 1 ]; then
    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
  fi
}