move rtc to a service

pull/182/head
Yossi 2018-04-28 10:57:54 +03:00
parent a4e4ea59f8
commit d4cc42fc18
3 changed files with 15 additions and 4 deletions

View File

@ -13,6 +13,7 @@ install -m 644 files/systemctl/record.service ${ROOTFS_DIR}/lib/systemd/system/r
install -m 644 files/systemctl/ws.service ${ROOTFS_DIR}/lib/systemd/system/ws.service
install -m 644 files/systemctl/live.service ${ROOTFS_DIR}/lib/systemd/system/live.service
install -m 644 files/systemctl/led.service ${ROOTFS_DIR}/lib/systemd/system/led.service
install -m 644 files/systemctl/rtc.service ${ROOTFS_DIR}/lib/systemd/system/rtc.service
on_chroot << EOF
@ -122,6 +123,7 @@ sudo update-rc.d dride-core defaults
sudo systemctl enable record
sudo systemctl enable ble
sudo systemctl enable led
sudo systemctl enable rtc
if [ ${OS_TYPE} == "dride-plus" ]; then
## GPS https://www.raspberrypi.org/forums/viewtopic.php?p=947968#p947968

View File

@ -19,10 +19,6 @@ case "$1" in
# TODO: refactor this to be done internally
# pull up resistor on pin 16
sudo python /home/core/daemons/bluetooth/initPin.py
echo "Setting up HwClock"
sudo hwclock -s || echo "RTC is not set."
;;
stop)
echo "Stopping dride-core"

View File

@ -0,0 +1,13 @@
[Unit]
Description=Control the web service service of your Dride
Documentation=https://dride.io/documentation
After=network.target
[Service]
Type=simple
User=pi
ExecStart=hwclock -s
[Install]
WantedBy=multi-user.target