summarylogtreecommitdiffstats
path: root/bsp-tinkerboard.install
blob: 07dd94afe40643cdfc7334864c84fe020fa4ad8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
post_install() {
  groupadd -r -f i2c
  groupadd -r -f gpio

  systemctl enable tinker-bluetooth.service
  systemctl start tinker-bluetooth.service

  sed -i '/#load-module module-alsa-sink/r /etc/pulse/pulseaudio-sink.txt' /etc/pulse/default.pa >/dev/null 2>&1
  sed -i '/#load-module module-alsa-sink/d' /etc/pulse/default.pa >/dev/null 2>&1

  sed -i '/#load-module module-alsa-source device=hw:1,0/r /etc/pulse/pulseaudio-source.txt' /etc/pulse/default.pa >/dev/null 2>&1
  sed -i '/#load-module module-alsa-source device=hw:1,0/d' /etc/pulse/default.pa >/dev/null 2>&1
}

pre_remove() {
  systemctl stop tinker-bluetooth.service
  systemctl disable tinker-bluetooth.service
}