-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflash.sh
More file actions
executable file
·40 lines (31 loc) · 1.07 KB
/
Copy pathflash.sh
File metadata and controls
executable file
·40 lines (31 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
###############################################################
# This script will flash the TFT File ino The Nextion Screen #
# #
# VE3RD 2020/04/07 #
###############################################################
set -o errexit
set -o pipefail
echo "Stop services"
sudo pistar-watchdog.service stop > /dev/null
sudo systemctl stop mmdvmhost.timer
sudo systemctl stop mmdvmhost.service
sudo systemctl stop cron.service
sudo systemctl stop mmdvmhost.service
sudo systemctl stop mmdvmhost.timer
sudo systemctl stop nextiondriver.service
echo "Services Stopped"
if [ -z "$1" ]; then
echo "Syntax: flash NX3224K024.tft "
echo "Where NX3224K024.tft is Your Screen File"
echo "The file must be located in /usr/local/etc/"
exit
fi
pathstr="/usr/local/etc/$1"
if [ -f "$pathstr" ]; then
echo "File $pathstr Found - Proceeding to Flash"
else
echo "File $pathstr NOT Found - Flash Aborted!"
fi;
sudo python nextion.py ./NX3224K024.tft /dev/ttyUSB0 &
sudo reboot