summaryrefslogtreecommitdiff
path: root/extra/brltty/brltty.install
diff options
context:
space:
mode:
Diffstat (limited to 'extra/brltty/brltty.install')
-rw-r--r--extra/brltty/brltty.install20
1 files changed, 20 insertions, 0 deletions
diff --git a/extra/brltty/brltty.install b/extra/brltty/brltty.install
new file mode 100644
index 000000000..952ae58ff
--- /dev/null
+++ b/extra/brltty/brltty.install
@@ -0,0 +1,20 @@
+post_install () {
+ getent group brlapi &>/dev/null || groupadd -r brlapi
+ if [ ! -e /etc/brlapi.key ]; then
+ mcookie >/etc/brlapi.key
+ chmod 0640 /etc/brlapi.key
+ chgrp brlapi /etc/brlapi.key
+ echo "Please add your user to the brlapi group."
+ fi
+}
+
+post_upgrade () {
+ post_install
+}
+
+post_remove () {
+ getent group brlapi >/dev/null 2>&1 && groupdel brlapi
+ if [ -e /etc/brlapi.key ]; then
+ rm -f /etc/brlapi.key
+ fi
+}