Update install.sh
This commit is contained in:
parent
a2774b30e0
commit
d22bf47d04
33
install.sh
33
install.sh
|
|
@ -87,7 +87,7 @@ while True:
|
|||
humidity = data["main"]["humidity"]
|
||||
weather_description = data["weather"][0]["description"]
|
||||
clima = f" / Clima en {name}: " if name else " / Clima: "
|
||||
weather_data = f"{deg}/{wind}g{gust}t{temperature}r{rain}p000h{humidity}b{presure}0"
|
||||
weather_data = f"{deg}/{wind}g{gust}t{temperature}r{rain}p000h{humidity}b{presure}0{comment}{clima}{weather_description}"
|
||||
else:
|
||||
name = ""
|
||||
temperature = "000"
|
||||
|
|
@ -98,10 +98,10 @@ while True:
|
|||
rain = "000"
|
||||
humidity = "00"
|
||||
weather_description = ""
|
||||
clima = ""
|
||||
weather_data = "000/000g000t032r000p000h..b00000Data Weather not found / "
|
||||
clima = " / Clima: "
|
||||
weather_data = "000/000g000t032r000p000h..b00000WX1 Data Weather not found"
|
||||
current_time_utc = datetime.utcnow().strftime("%d%H%M")
|
||||
packet = f"{address}@{current_time_utc}z{latitude}{simbol_primary}{longitude}{simbol_secundary}{weather_data}{comment}{clima}{weather_description}"
|
||||
packet = f"{address}@{current_time_utc}z{latitude}{simbol_primary}{longitude}{simbol_secundary}{weather_data}"
|
||||
packet2 = f"{address}>{text}"
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.connect((serverHost, serverPort))
|
||||
|
|
@ -114,6 +114,7 @@ while True:
|
|||
|
||||
time.sleep(every * 60)
|
||||
|
||||
|
||||
EOF
|
||||
###########################
|
||||
sudo cat > /bin/menu-py-wx <<- "EOF"
|
||||
|
|
@ -242,18 +243,18 @@ cp /opt/python-wx/wx1.py /opt/python-wx/wx10.py
|
|||
cp /opt/python-wx/wx1.py /opt/python-wx/wx11.py
|
||||
cp /opt/python-wx/wx1.py /opt/python-wx/wx12.py
|
||||
|
||||
sudo sed -i "s/Python APRS WX1/Python APRS WX1/g" /opt/python-wx/wx1.py
|
||||
sudo sed -i "s/Python APRS WX1/Python APRS WX2/g" /opt/python-wx/wx2.py
|
||||
sudo sed -i "s/Python APRS WX1/Python APRS WX3/g" /opt/python-wx/wx3.py
|
||||
sudo sed -i "s/Python APRS WX1/Python APRS WX4/g" /opt/python-wx/wx4.py
|
||||
sudo sed -i "s/Python APRS WX1/Python APRS WX5/g" /opt/python-wx/wx5.py
|
||||
sudo sed -i "s/Python APRS WX1/Python APRS WX6/g" /opt/python-wx/wx6.py
|
||||
sudo sed -i "s/Python APRS WX1/Python APRS WX7/g" /opt/python-wx/wx7.py
|
||||
sudo sed -i "s/Python APRS WX1/Python APRS WX8/g" /opt/python-wx/wx8.py
|
||||
sudo sed -i "s/Python APRS WX1/Python APRS WX9/g" /opt/python-wx/wx9.py
|
||||
sudo sed -i "s/Python APRS WX1/Python APRS WX10/g" /opt/python-wx/wx10.py
|
||||
sudo sed -i "s/Python APRS WX1/Python APRS WX11/g" /opt/python-wx/wx11.py
|
||||
sudo sed -i "s/Python APRS WX1/Python APRS WX12/g" /opt/python-wx/wx12.py
|
||||
sudo sed -i "s/WX1/WX1/g" /opt/python-wx/wx1.py
|
||||
sudo sed -i "s/WX1/WX2/g" /opt/python-wx/wx2.py
|
||||
sudo sed -i "s/WX1/WX3/g" /opt/python-wx/wx3.py
|
||||
sudo sed -i "s/WX1/WX4/g" /opt/python-wx/wx4.py
|
||||
sudo sed -i "s/WX1/WX5/g" /opt/python-wx/wx5.py
|
||||
sudo sed -i "s/WX1/WX6/g" /opt/python-wx/wx6.py
|
||||
sudo sed -i "s/WX1/WX7/g" /opt/python-wx/wx7.py
|
||||
sudo sed -i "s/WX1/WX8/g" /opt/python-wx/wx8.py
|
||||
sudo sed -i "s/WX1/WX9/g" /opt/python-wx/wx9.py
|
||||
sudo sed -i "s/WX1/WX10/g" /opt/python-wx/wx10.py
|
||||
sudo sed -i "s/WX1/WX11/g" /opt/python-wx/wx11.py
|
||||
sudo sed -i "s/WX1/WX12/g" /opt/python-wx/wx12.py
|
||||
|
||||
cp /lib/systemd/system/py-wx1.service /lib/systemd/system/py-wx2.service
|
||||
cp /lib/systemd/system/py-wx1.service /lib/systemd/system/py-wx3.service
|
||||
|
|
|
|||
Loading…
Reference in New Issue