From cf392a5c9680e9d3a3e9d0fd35ec90c7f335c100 Mon Sep 17 00:00:00 2001 From: matlink Date: Thu, 13 Nov 2014 19:34:55 +0100 Subject: [PATCH] fixed path error --- scripts/install | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/scripts/install b/scripts/install index b988768..4c543bf 100644 --- a/scripts/install +++ b/scripts/install @@ -7,6 +7,7 @@ domain=$1 path=$2 admin=$3 is_public=$4 +password=$5 # Check domain/path availability @@ -33,22 +34,30 @@ sudo mkdir -p $final_path #copy files to final folder and set permissions sudo cp -R ../src/* $final_path/ sudo chown www-data:www-data -R $final_path -sudo chmod 750 -R $final_path #configure nginx settings sudo sed -i "s@YNH_EXAMPLE_PATH@$path@g" ../conf/nginx.conf sudo sed -i "s@YNH_EXAMPLE_ALIAS@$final_path@g" ../conf/nginx.conf sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf -# If app is public, add url to SSOWat conf as skipped_uris -if [ "$is_public" = "Yes" ]; -then +#temporal set public acessible sudo yunohost app setting $app skipped_uris -v "/" + +#make request to install app +#token= +curl -k -X POST --data "default_lang=fr&timezone=Greenland&install=Installer&name=$admin&login=$admin&pwd=$password&pwd2=$password&token=$token" https://$domain/$path/install.php +sudo chmod 750 -R $final_path + +# If app is private, remove url to SSOWat conf from skipped_uris +if [ "$is_public" = "No" ]; +then +sudo yunohost app setting wordpress skipped_uris -d fi #adding admin to the allowed users sudo yunohost app addaccess $app -u $admin +sudo rm -f $final_path/install.php # Restart services sudo service nginx reload sudo yunohost app ssowatconf \ No newline at end of file