summaryrefslogtreecommitdiff
path: root/testing/brltty/brltty.install
diff options
context:
space:
mode:
Diffstat (limited to 'testing/brltty/brltty.install')
-rw-r--r--testing/brltty/brltty.install20
1 files changed, 20 insertions, 0 deletions
diff --git a/testing/brltty/brltty.install b/testing/brltty/brltty.install
new file mode 100644
index 000000000..952ae58ff
--- /dev/null
+++ b/testing/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
+}