diff --git a/scripts/install b/scripts/install index 51951c9..6eee341 100644 --- a/scripts/install +++ b/scripts/install @@ -13,9 +13,7 @@ fi # Remove trailing "/" for next commands path=${path%/} -if [ -z "$path" ]; then - path="/" -fi + # Generate random DES key & password @@ -33,8 +31,13 @@ db_pwd=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' sudo chown -R www-data: $final_path # Modify Nginx configuration file and copy it to Nginx conf directory +sudo sed -i "s@PATHTOCHANGE2@$path@g" ../conf/nginx.conf + +if [ -z "$path" ]; then + path="/" +fi + sudo sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf -path=${path%/} sudo sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/jappix.conf sudo sed -i "s@PATHTOCHANGE@$path@g" $final_path/store/conf/main.xml