Browse Source

install: fix permissions and reboot to apply changes

tags/1.5
Nico Rey 4 years ago
parent
commit
06b3798d66
1 changed files with 7 additions and 8 deletions
  1. +7
    -8
      install.sh

+ 7
- 8
install.sh View File

@@ -178,10 +178,10 @@ set -e
log_running "Setting up Nginx..." log_running "Setting up Nginx..."
sudo cp templates/nginx.cfg /etc/nginx/sites-enabled/default sudo cp templates/nginx.cfg /etc/nginx/sites-enabled/default
( (
sudo mkdir -p /var/www/wx
sudo chown -R www-data:www-data /var/www/wx
sudo mkdir -p /var/www/wx/images
sudo chown -R www-data:www-data /var/www/wx/images
sudo usermod -a -G www-data pi sudo usermod -a -G www-data pi
sudo chmod 775 /var/www/wx
sudo chmod 775 /var/www/wx/images
) )
sudo systemctl restart nginx sudo systemctl restart nginx
sudo cp -rp templates/webpanel/* /var/www/wx/ sudo cp -rp templates/webpanel/* /var/www/wx/
@@ -236,11 +236,6 @@ sed -i -e "s/change_latitude/${lat}/g;s/change_longitude/${lon}/g" "$HOME/.wxtoi
sed -i -e "s/change_latitude/${lat}/g;s/change_longitude/$(echo "$lon * -1" | bc)/g" "$HOME/.predict/predict.qth" sed -i -e "s/change_latitude/${lat}/g;s/change_longitude/$(echo "$lon * -1" | bc)/g" "$HOME/.predict/predict.qth"
sed -i -e "s/change_latitude/${lat}/g;s/change_longitude/${lon}/g;s/change_tz/$(echo "$timezone * -1" | bc)/g" "sun.py" sed -i -e "s/change_latitude/${lat}/g;s/change_longitude/${lon}/g;s/change_tz/$(echo "$timezone * -1" | bc)/g" "sun.py"


### Launch scheduler
newgrp www-data << END
/home/pi/raspberry-noaa/schedule.sh
END

success "Install done! Double check your $HOME/.noaa.conf settings" success "Install done! Double check your $HOME/.noaa.conf settings"


echo " echo "
@@ -248,5 +243,9 @@ echo "
your Twitter credentials on $HOME/.tweepy.conf your Twitter credentials on $HOME/.tweepy.conf
" "


set +e

### Running WXTOIMG to have the user accept the licensing agreement ### Running WXTOIMG to have the user accept the licensing agreement
wxtoimg wxtoimg

sudo reboot

Loading…
Cancel
Save