summaryrefslogtreecommitdiff
path: root/extra/polkit/polkit.install
diff options
context:
space:
mode:
Diffstat (limited to 'extra/polkit/polkit.install')
-rw-r--r--extra/polkit/polkit.install18
1 files changed, 18 insertions, 0 deletions
diff --git a/extra/polkit/polkit.install b/extra/polkit/polkit.install
new file mode 100644
index 000000000..fbb98919e
--- /dev/null
+++ b/extra/polkit/polkit.install
@@ -0,0 +1,18 @@
+post_install() {
+ getent group polkitd >/dev/null || groupadd -g 102 polkitd
+ getent passwd polkitd >/dev/null || useradd -c 'Policy Kit Daemon' -u 102 -g polkitd -d '/' -s /bin/false polkitd
+ passwd -l polkitd &>/dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ if getent passwd polkitd >/dev/null; then
+ userdel polkitd
+ fi
+ if getent group polkitd >/dev/null; then
+ groupdel polkitd
+ fi
+}