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
#########################################################################################################################
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[@]}"
do
@ -43,6 +43,7 @@ do
echo "$app ya instalada"
fi
done
#"ntp"
#########################################################################################################################
# audio raspberry
#########################################################################################################################
@ -97,19 +98,19 @@ EOF
sudo ln -sf /lib/systemd/system/gpsd.service /etc/systemd/system/multi-user.target.wants/
#sudo systemctl start gpsd
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")
#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")
for palabra in "${palabra[@]}"
do
#for palabra in "${palabra[@]}"
#do
if grep -i -E "$palabra" "$archivo" >/dev/null 2>&1; then
echo "line found"
else
echo "$palabra">> "$archivo"
fi
done
sudo /etc/init.d/ntp restart
#if grep -i -E "$palabra" "$archivo" >/dev/null 2>&1; then
# echo "line found"
# else
# echo "$palabra">> "$archivo"
#fi
#done
#sudo /etc/init.d/ntp restart
cat > /lib/systemd/system/tnmea.service <<- "EOFT"
[Unit]