-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprime.sh
More file actions
executable file
·70 lines (51 loc) · 1.58 KB
/
prime.sh
File metadata and controls
executable file
·70 lines (51 loc) · 1.58 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
#########################################################################
# Prime_TGIF_Network Support #
# This Script will install The Prime Security Password into #
# /root/DMR_Hosts.txt and run the Pi-Star Host File Updatde Routine #
# #
# VE3RD 2020-05-12 #
###########################################################333###########
export NCURSES_NO_UTF8_ACS=1
declare -i slen
if [ "$1" ]; then
sc1="$1"
slen1=$(expr length "$sc1")
if [ "$slen1" != 16 ]; then
echo "Wrong String Length for Security Password"
exit
fi
m4="$sc1"
else
if [ -f /home/pi-star/Prime.txt ]; then
sc1=$(cat /home/pi-star/Prime.txt)
slen1=$(expr length "$sc1")
if [ "$slen1" != 16 ]; then
echo "Wrong String Length for Security Password"
exit
fi
m4="$sc1"
else
echo "Security Password Not Found"
exit
fi
fi
sudo mount -o remount,rw /
slen2=$(expr length "$sc2")
echo "$sc1"
echo "$sc2"
m1="Secured_TGIF_Network"
m2="0000"
m3="tgif.network"
m5="62031"
textstr="$m1\t\t$m2\t$m3\t\t\t$m4\t\t$m5"
sudo sed -i "\$a$textstr" /root/DMR_Hosts.txt
echo "Updating Hostfiles..."
sudo /usr/local/sbin/HostFilesUpdate.sh
if [ "$?" == "0" ]; then
echo "Host Files Successfully Updated"
else
echo "Host File Update Failed!"
fi
echo ""
echo "Created an entry in your DMR Host file called Secured_TGIF_Network"