summaryrefslogtreecommitdiffstats
path: root/linhes/plex-media-server/plex-media-server.install
blob: 3a5a4e48acc57943f65c6d016cec37d25624e461 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
post_upgrade() {
  # The plex user's home directory needs to change too.
  if [[ "$( getent passwd plex | cut -d: -f6 )" != "/usr/lib/plexmediaserver" ]]; then
    usermod -d /usr/lib/plexmediaserver plex
    if [[ $? -ne 0 ]]; then
      echo "Could not change plex users home directory."
      echo "Run: sudo systemctl stop plexmediaserver ; sudo usermod -d /usr/lib/plexmediaserver plex ; sudo systemctl start plexmediaserver"
    fi
  fi
}

# vim: ts=2 sw=2 et: