move rtc to a service
This commit is contained in:
parent
a4e4ea59f8
commit
d4cc42fc18
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
13
stage2/06-dride-base/files/systemctl/rtc.service
Normal file
13
stage2/06-dride-base/files/systemctl/rtc.service
Normal 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
|
Loading…
Reference in New Issue
Block a user