36 lines
682 B
Plaintext
36 lines
682 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
# Get config
|
||
|
. ~/.config/jebbatime.conf
|
||
|
|
||
|
cd $JEBBATIMEGITROOT
|
||
|
|
||
|
./tools/wasptool \
|
||
|
--battery \
|
||
|
--device $JEBBATIMEDEVMAC
|
||
|
|
||
|
echo "Connecting Bluetooth"
|
||
|
sudo bluetoothctl connect $JEBBATIMEDEVMAC
|
||
|
|
||
|
echo "Setting host `hostname` time via NTP"
|
||
|
sudo ntpdate $JEBBATIMENTPSERVER
|
||
|
|
||
|
echo "Checking time on watch"
|
||
|
./tools/wasptool \
|
||
|
--check-rtc \
|
||
|
--device $JEBBATIMEDEVMAC
|
||
|
|
||
|
echo "Setting time on watch"
|
||
|
./tools/wasptool \
|
||
|
--rtc \
|
||
|
--device $JEBBATIMEDEVMAC
|
||
|
|
||
|
echo "Checking time on watch"
|
||
|
./tools/wasptool \
|
||
|
--check-rtc \
|
||
|
--device $JEBBATIMEDEVMAC
|
||
|
|
||
|
echo "Disconnecting Bluetooth"
|
||
|
sudo bluetoothctl disconnect $JEBBATIMEDEVMAC
|
||
|
|