summaryrefslogtreecommitdiff
path: root/community/plex-home-theater/plex-home-theater.install
diff options
context:
space:
mode:
Diffstat (limited to 'community/plex-home-theater/plex-home-theater.install')
-rw-r--r--community/plex-home-theater/plex-home-theater.install16
1 files changed, 16 insertions, 0 deletions
diff --git a/community/plex-home-theater/plex-home-theater.install b/community/plex-home-theater/plex-home-theater.install
new file mode 100644
index 000000000..e84deb4f2
--- /dev/null
+++ b/community/plex-home-theater/plex-home-theater.install
@@ -0,0 +1,16 @@
+post_install() {
+ getent group plex > /dev/null 2>&1 || groupadd -g 421 plex
+ getent passwd plex > /dev/null 2>&1 || useradd -c 'Plex user' -u 421 -g plex -G audio,video,network,optical -d /var/lib/plex -s /sbin/nologin plex
+ passwd -l plex > /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ getent passwd plex > /dev/null 2>&1 && userdel plex
+ getent group plex > /dev/null 2>&1 && groupdel plex
+}
+
+# vim: ts=2 sw=2 et: