#!/bin/sh

case $1/$2 in
	pre/*)
		echo "Disabling bluetooth..."
		systemctl stop bluetooth.service
		modprobe -r hci_uart
		;;
	post/*)
		echo "Enabling bluetooth..."
		modprobe hci_uart
		systemctl start bluetooth.service
		;;
esac

exit 0
