summaryrefslogtreecommitdiffstats
path: root/linhes/plex-media-server/plex-media-server.install
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2022-11-11 22:06:28 (GMT)
committerBritney Fransen <brfransen@gmail.com>2022-11-11 22:06:28 (GMT)
commitce6e2387c69ff65ad2aa32e32f03a9ff797559c5 (patch)
tree733a8bf4ea08ad914c9d85ad741cf64d3929cd93 /linhes/plex-media-server/plex-media-server.install
parentd12df93a594b60d916d28aa979331ca56611536a (diff)
downloadlinhes_pkgbuild-ce6e2387c69ff65ad2aa32e32f03a9ff797559c5.zip
linhes_pkgbuild-ce6e2387c69ff65ad2aa32e32f03a9ff797559c5.tar.gz
linhes_pkgbuild-ce6e2387c69ff65ad2aa32e32f03a9ff797559c5.tar.bz2
plex-media-server: 1.29.2
Diffstat (limited to 'linhes/plex-media-server/plex-media-server.install')
-rw-r--r--linhes/plex-media-server/plex-media-server.install12
1 files changed, 12 insertions, 0 deletions
diff --git a/linhes/plex-media-server/plex-media-server.install b/linhes/plex-media-server/plex-media-server.install
new file mode 100644
index 0000000..3a5a4e4
--- /dev/null
+++ b/linhes/plex-media-server/plex-media-server.install
@@ -0,0 +1,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: