Sfoglia il codice sorgente

File tidy-up

tags/v1.0
Nico Rey 4 anni fa
parent
commit
b3f6914df1
12 ha cambiato i file con 12 aggiunte e 12 eliminazioni
  1. +9
    -9
      install.sh
  2. +1
    -1
      receive.sh
  3. +1
    -1
      receive_meteor.sh
  4. +0
    -0
      software/medet_arm
  5. +0
    -0
      software/wxtoimg-armhf-2.11.2-beta.deb
  6. +0
    -0
      templates/fstab
  7. +0
    -0
      templates/index.html
  8. +0
    -0
      templates/modprobe.d/rtlsdr.conf
  9. +0
    -0
      templates/nginx.cfg
  10. +1
    -1
      templates/noaa.conf
  11. +0
    -0
      templates/predict.qth
  12. +0
    -0
      templates/wxtoimgrc

+ 9
- 9
install.sh Vedi File

@@ -60,7 +60,7 @@ log_done "Packages installed"
if [ -e /etc/modprobe.d/rtlsdr.conf ]; then if [ -e /etc/modprobe.d/rtlsdr.conf ]; then
log_done "DVB modules were already blacklisted" log_done "DVB modules were already blacklisted"
else else
sudo cp modprobe.d/rtlsdr.conf /etc/modprobe.d/rtlsdr.conf
sudo cp templates/modprobe.d/rtlsdr.conf /etc/modprobe.d/rtlsdr.conf
log_done "DVB modules are blacklisted now" log_done "DVB modules are blacklisted now"
fi fi


@@ -90,7 +90,7 @@ if [ -e /usr/local/bin/xwxtoimg ]; then
log_done "WxToIMG was already installed" log_done "WxToIMG was already installed"
else else
log_running "Installing WxToIMG..." log_running "Installing WxToIMG..."
sudo dpkg -i wxtoimg-armhf-2.11.2-beta.deb
sudo dpkg -i software/wxtoimg-armhf-2.11.2-beta.deb
log_done "WxToIMG installed" log_done "WxToIMG installed"
fi fi


@@ -98,21 +98,21 @@ fi
if [ -e "$HOME/.noaa.conf" ]; then if [ -e "$HOME/.noaa.conf" ]; then
log_done "$HOME/.noaa.conf already exists" log_done "$HOME/.noaa.conf already exists"
else else
cp "noaa.conf" "$HOME/.noaa.conf"
cp "templates/noaa.conf" "$HOME/.noaa.conf"
log_done "$HOME/.noaa.conf installed" log_done "$HOME/.noaa.conf installed"
fi fi


if [ -e "$HOME/.predict/predict.qth" ]; then if [ -e "$HOME/.predict/predict.qth" ]; then
log_done "$HOME/.predict/predict.qth already exists" log_done "$HOME/.predict/predict.qth already exists"
else else
cp "predict.qth" "$HOME/.predict/predict.qth"
cp "templates/predict.qth" "$HOME/.predict/predict.qth"
log_done "$HOME/.predict/predict.qth installed" log_done "$HOME/.predict/predict.qth installed"
fi fi


if [ -e "$HOME/.wxtoimgrc" ]; then if [ -e "$HOME/.wxtoimgrc" ]; then
log_done "$HOME/.wxtoimgrc already exists" log_done "$HOME/.wxtoimgrc already exists"
else else
cp "wxtoimgrc" "$HOME/.wxtoimgrc"
cp "templates/wxtoimgrc" "$HOME/.wxtoimgrc"
log_done "$HOME/.wxtoimgrc installed" log_done "$HOME/.wxtoimgrc installed"
fi fi


@@ -136,7 +136,7 @@ if [ -e /usr/bin/medet_arm ]; then
log_done "medet_arm was already installed" log_done "medet_arm was already installed"
else else
log_running "Installing medet_arm..." log_running "Installing medet_arm..."
sudo cp medet_arm /usr/bin/medet_arm
sudo cp software/medet_arm /usr/bin/medet_arm
sudo chmod +x /usr/bin/medet_arm sudo chmod +x /usr/bin/medet_arm
log_done "medet_arm installed" log_done "medet_arm installed"
fi fi
@@ -152,7 +152,7 @@ fi


### Setup Nginx ### Setup Nginx
log_running "Setting up Nginx..." log_running "Setting up Nginx..."
sudo cp nginx.cfg /etc/nginx/sites-enabled/default
sudo cp templates/nginx.cfg /etc/nginx/sites-enabled/default
( (
sudo mkdir -p /var/www/wx sudo mkdir -p /var/www/wx
sudo chown -R www-data:www-data /var/www/wx sudo chown -R www-data:www-data /var/www/wx
@@ -161,7 +161,7 @@ sudo cp nginx.cfg /etc/nginx/sites-enabled/default
) )
sudo systemctl restart nginx sudo systemctl restart nginx
if [ ! -e /var/www/wx/index.html ]; then if [ ! -e /var/www/wx/index.html ]; then
cp index.html /var/www/wx/index.html
cp templates/index.html /var/www/wx/index.html
fi fi
log_done "Nginx configured" log_done "Nginx configured"


@@ -171,7 +171,7 @@ if [ $? -eq 0 ]; then
log_done "ramfs already setup" log_done "ramfs already setup"
else else
sudo mkdir -p /var/ramfs sudo mkdir -p /var/ramfs
cat fstab | sudo tee -a /etc/fstab > /dev/null
cat templates/fstab | sudo tee -a /etc/fstab > /dev/null
log_done "Ramfs installed" log_done "Ramfs installed"
fi fi
set +e set +e


+ 1
- 1
receive.sh Vedi File

@@ -8,7 +8,7 @@


## pass start timestamp and sun elevation ## pass start timestamp and sun elevation
PASS_START=$(expr "$5" + 90) PASS_START=$(expr "$5" + 90)
SUN_ELEV=$(python3 sun.py "$PASS_START")
SUN_ELEV=$(python3 "$NOAA_HOME"/sun.py "$PASS_START")


if pgrep "rtl_fm" > /dev/null if pgrep "rtl_fm" > /dev/null
then then


+ 1
- 1
receive_meteor.sh Vedi File

@@ -6,7 +6,7 @@


## pass start timestamp and sun elevation ## pass start timestamp and sun elevation
PASS_START=$(expr "$5" + 90) PASS_START=$(expr "$5" + 90)
SUN_ELEV=$(python3 sun.py "$PASS_START")
SUN_ELEV=$(python3 "$NOAA_HOME"/sun.py "$PASS_START")


if [ "${SUN_ELEV}" -lt "${SUN_MIN_ELEV}" ]; then if [ "${SUN_ELEV}" -lt "${SUN_MIN_ELEV}" ]; then
log "Sun elev is too low. Meteor IR radiometers are not working" "INFO" log "Sun elev is too low. Meteor IR radiometers are not working" "INFO"


medet_arm → software/medet_arm Vedi File


wxtoimg-armhf-2.11.2-beta.deb → software/wxtoimg-armhf-2.11.2-beta.deb Vedi File


fstab → templates/fstab Vedi File


index.html → templates/index.html Vedi File


modprobe.d/rtlsdr.conf → templates/modprobe.d/rtlsdr.conf Vedi File


nginx.cfg → templates/nginx.cfg Vedi File


noaa.conf → templates/noaa.conf Vedi File

@@ -1,4 +1,4 @@
NOAA_HOME=/home/pi
NOAA_HOME=/home/pi/raspberry-noaa
NOAA_OUTPUT=/var/www/wx NOAA_OUTPUT=/var/www/wx
METEOR_OUTPUT=/var/www/wx/meteor METEOR_OUTPUT=/var/www/wx/meteor
NOAA_AUDIO=/var/ramfs NOAA_AUDIO=/var/ramfs

predict.qth → templates/predict.qth Vedi File


wxtoimgrc → templates/wxtoimgrc Vedi File


Caricamento…
Annulla
Salva