2022-10-28 22:33:07 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-08-07 00:30:11 +00:00
|
|
|
# Minimal OS variable loading for performance
|
2023-09-04 10:46:11 +00:00
|
|
|
. /etc/profile.d/001-functions
|
2022-10-28 22:33:07 +00:00
|
|
|
|
2023-07-23 13:47:19 +00:00
|
|
|
(
|
|
|
|
if [ "$(get_setting bluetooth.enabled)" == "1" ]
|
|
|
|
then
|
|
|
|
tocon "Starting bluetooth..."
|
2024-01-22 14:52:33 +00:00
|
|
|
if [ ! -e "/storage/.cache/services/bluez.conf" ]
|
|
|
|
then
|
|
|
|
cp -f /usr/share/services/bluez.conf /storage/.cache/services/bluez.conf
|
|
|
|
fi
|
2023-07-23 13:47:19 +00:00
|
|
|
nohup systemctl start bluetooth &
|
|
|
|
nohup systemctl start bluetooth-agent &
|
|
|
|
nohup systemctl start bluetoothsense &
|
|
|
|
rfkill unblock bluetooth
|
|
|
|
else
|
|
|
|
rfkill block bluetooth
|
|
|
|
fi
|
|
|
|
) &
|