#!/bin/sh # # Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. # \copyright \n # THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, \n # IN PART OR IN WHOLE, \n # WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. \n # \file setup.sh # \date 2020/03/12 # \author Behrouz NematiPour # \details # This script setup the device to run the Denali Application. # # echo "setup the time/date controller" # to use the system time/date and not use the network time protocol timedatectl set-ntp 0 echo "Setup the time/date" while true; do read -p "please enter the date (yyyy-MM-dd HH:mm): " -r DATE date -s "$DATE" if [ $? -eq 0 ]; then break fi done echo "Setup the hardware clock" hwclock -w echo "Disabling Qt demo" systemctl disable qtlauncher systemctl disable ebikedata echo "Setting denali as default auto start application" mkdir /etc/init.d/ mv autostart /etc/init.d/ update-rc.d autostart defaults echo "Syncing file system updates" sync read -p "ready to reboot? [y,n]" -n 1 -r CONFIRM if [ "$CONFIRM" == "y" ]; then reboot fi