mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-25 20:26:34 +00:00
fix bluetooth init script
This commit is contained in:
parent
42538f2142
commit
406aad843f
@ -30,11 +30,6 @@ configure() {
|
|||||||
|
|
||||||
# bring adapter up
|
# bring adapter up
|
||||||
hciconfig $hci up
|
hciconfig $hci up
|
||||||
|
|
||||||
# if DiscoverableTimeout is set to 0, make adapter is discoverable from boot time
|
|
||||||
if grep -E '^DiscoverableTimeout\s*=\s*0$' $run_conf &>/dev/null; then
|
|
||||||
hciconfig $hci piscan
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
@ -59,10 +54,16 @@ start() {
|
|||||||
msg_fail
|
msg_fail
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg_begin "Starting bluetoothd"
|
msg_begin "Starting bluetoothd"
|
||||||
/usr/libexec/bluetooth/bluetoothd &>/dev/null &
|
$bluetoothd &>/dev/null &
|
||||||
msg_done
|
msg_done
|
||||||
|
|
||||||
|
# if DiscoverableTimeout is set to 0, make adapter discoverable from boot time
|
||||||
|
if grep -E '^DiscoverableTimeout\s*=\s*0$' $run_conf &>/dev/null; then
|
||||||
|
sleep 1
|
||||||
|
hciconfig $hci piscan
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user