Update direwolf.sh

This commit is contained in:
RaspbianProyect by HP3ICC 2023-07-05 22:49:55 +00:00
parent 991f4fe28f
commit da9b665c8d
1 changed files with 13 additions and 12 deletions

View File

@ -30,7 +30,7 @@ fi
# requeriments # requeriments
######################################################################################################################### #########################################################################################################################
apps=("git" "gcc" "g++" "make" "cmake" "libasound2-dev" "libudev-dev" "gpsd" "libgps-dev" "gpsd-clients" "gpsd-tools" "ntp") apps=("git" "gcc" "g++" "make" "cmake" "libasound2-dev" "libudev-dev" "gpsd" "libgps-dev" "gpsd-clients" "gpsd-tools")
for app in "${apps[@]}" for app in "${apps[@]}"
do do
@ -43,6 +43,7 @@ do
echo "$app ya instalada" echo "$app ya instalada"
fi fi
done done
#"ntp"
######################################################################################################################### #########################################################################################################################
# audio raspberry # audio raspberry
######################################################################################################################### #########################################################################################################################
@ -97,19 +98,19 @@ EOF
sudo ln -sf /lib/systemd/system/gpsd.service /etc/systemd/system/multi-user.target.wants/ sudo ln -sf /lib/systemd/system/gpsd.service /etc/systemd/system/multi-user.target.wants/
#sudo systemctl start gpsd #sudo systemctl start gpsd
archivo="/etc/ntp.conf" #archivo="/etc/ntp.conf"
palabra=("server 127.127.28.0 4" "fudge 127.127.28.0 time1 0.340 refid GPS" "server 127.127.28.1 prefer" "fudge 127.127.28.1 refid GPS1") #palabra=("server 127.127.28.0 4" "fudge 127.127.28.0 time1 0.340 refid GPS" "server 127.127.28.1 prefer" "fudge 127.127.28.1 refid GPS1")
for palabra in "${palabra[@]}" #for palabra in "${palabra[@]}"
do #do
if grep -i -E "$palabra" "$archivo" >/dev/null 2>&1; then #if grep -i -E "$palabra" "$archivo" >/dev/null 2>&1; then
echo "line found" # echo "line found"
else # else
echo "$palabra">> "$archivo" # echo "$palabra">> "$archivo"
fi #fi
done #done
sudo /etc/init.d/ntp restart #sudo /etc/init.d/ntp restart
cat > /lib/systemd/system/tnmea.service <<- "EOFT" cat > /lib/systemd/system/tnmea.service <<- "EOFT"
[Unit] [Unit]