Skip to content

Commit

Permalink
Fix nginx change, install,sh moves material when changing folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Tidey committed Nov 1, 2015
1 parent 4254391 commit 18fc8bc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion etc/nginx/sites-available/rpicam.1
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ server {
if (!-f $document_root$fastcgi_script_name) {
return 404;
}
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
Expand Down
12 changes: 12 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ if [ ! -e ./config.txt ]; then
fi

source ./config.txt
rpicamdirold=$rpicamdir
if [ ! "${rpicamold:0:1}" == "" ]; then
rpicamdirold=/$rpicamdirold
fi


#Allow for a quiet install
if [ $# -eq 0 ] || [ "$1" != "q" ]; then
Expand Down Expand Up @@ -262,6 +267,13 @@ sudo chmod 755 /etc/rc.local
fn_stop

sudo mkdir -p /var/www$rpicamdir/media
#move old material if changing from a different install folder
if [ ! "$rpicamdir" == "$rpicamdirold" ]; then
if [ -e /var/www$rpicamdirold/index.php ]; then
sudo mv /var/www$rpicamdirold/* /var/www$rpicamdir
fi
fi

sudo cp -r www/* /var/www$rpicamdir/
if [ -e /var/www$rpicamdir/index.html ]; then
sudo rm /var/www$rpicamdir/index.html
Expand Down

0 comments on commit 18fc8bc

Please sign in to comment.