summarylogtreecommitdiffstats
path: root/arcticfox-config-bin.install
blob: d214b719747efbafba1f54da26c665ad6776656e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
post_install() {
    :
#!/bin/bash

UDEVFILE="/etc/udev/rules.d/99-arcticfox.rules"
GROUP="arcticfox"

echo "creating group $GROUP"
groupadd $GROUP

echo "creating $UDEVFILE"

cat > $UDEVFILE << EOF
# HIDAPI/libusb
SUBSYSTEM=="usb", ATTRS{idVendor}=="0416", ATTRS{idProduct}=="5020", GROUP="$GROUP", MODE="0660"

# HIDAPI/hidraw
KERNEL=="hidraw*", ATTRS{busnum}=="1", ATTRS{idVendor}=="0416", ATTRS{idProduct}=="5020", GROUP="$GROUP", MODE="0660"
EOF

echo "to get access to the arcticfox device add your user to the group $GROUP"

}
post_remove() {
    :
#!/bin/bash

# Delete the link to the binary
rm -f '/usr/local/bin/arcticfox-config'

}