Skip to content
Snippets Groups Projects
Commit e9b84f83 authored by Alvaro Graves's avatar Alvaro Graves
Browse files

Separating basedir from slodpsdir

parent d71f7388
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,8 @@ mysql_user="root" ...@@ -11,7 +11,8 @@ mysql_user="root"
mysql_pass="" mysql_pass=""
sparql_key=$RANDOM sparql_key=$RANDOM
basedir="http://localhost/slodps/" basedir="http://localhost/"
slodpsdir="slodps"
ns=$basedir ns=$basedir
endpoint="http://localhost/sparql?" endpoint="http://localhost/sparql?"
everything_ok="n" everything_ok="n"
...@@ -19,13 +20,10 @@ everything_ok="n" ...@@ -19,13 +20,10 @@ everything_ok="n"
if [ -e "$parent_htaccess" ] if [ -e "$parent_htaccess" ]
then then
echo ".htaccess file found in parent directory." echo ".htaccess file found in parent directory."
echo "Please remove it or add the content of $root_htaccess in it" echo "Please remove it to continue the installation."
exit exit
fi fi
echo "WARNING: Copying $root_htaccess as .htacess in parent directory"
echo ""
cp $root_htaccess $parent_htaccess
while [ "$everything_ok" != "y" ] while [ "$everything_ok" != "y" ]
do do
...@@ -38,6 +36,16 @@ do ...@@ -38,6 +36,16 @@ do
then then
basedir=$aux_basedir basedir=$aux_basedir
fi fi
echo -n "From the base directory, where is slodps located? (default '$slodps'): "
read aux_slodpsdir
echo ""
if [ "$aux_slodpsdir" != "" ]
then
slodpsdir=$aux_slodpsdir
fi
ns=$basedir ns=$basedir
echo -n "Type the local namespace you will use (default '$ns'): " echo -n "Type the local namespace you will use (default '$ns'): "
read aux_ns read aux_ns
...@@ -47,6 +55,7 @@ do ...@@ -47,6 +55,7 @@ do
ns=$aux_ns ns=$aux_ns
fi fi
echo -n "What is the URL of your SPARQL endpoint? (default $endpoint): " echo -n "What is the URL of your SPARQL endpoint? (default $endpoint): "
read aux_endpoint read aux_endpoint
echo "" echo ""
...@@ -108,7 +117,8 @@ do ...@@ -108,7 +117,8 @@ do
fi fi
echo "==Configuration==" echo "==Configuration=="
echo "Ok, so I have the following configuration:" echo "Ok, so I have the following configuration:"
echo "slodps is installed at $basedir" echo "Base URL is $basedir"
echo "slodps is installed at $basedir$slodpsdir"
echo "The local namespace is $ns" echo "The local namespace is $ns"
echo "Your SPARQL endpoint is located at $endpoint" echo "Your SPARQL endpoint is located at $endpoint"
echo "For slodps internal sparql endpoint the configuration is as follows:" echo "For slodps internal sparql endpoint the configuration is as follows:"
...@@ -154,5 +164,11 @@ done ...@@ -154,5 +164,11 @@ done
?>" ?>"
echo "$content" > $settings_file echo "$content" > $settings_file
chmod 644 $settings_file chmod 644 $settings_file
echo "New configuration file created" echo "New configuration file created"
echo ""
echo "WARNING: Copying $root_htaccess as .htacess in parent directory"
echo ""
cp $root_htaccess $parent_htaccess
echo 'RewriteRule ^(.+)$ '$slodpsdir'/index.php?q=$1 [L]' >> $parent_htaccess
...@@ -3,4 +3,4 @@ RewriteEngine on ...@@ -3,4 +3,4 @@ RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !.*/index.php$ RewriteCond %{SCRIPT_FILENAME} !.*/index.php$
RewriteRule ^(.+)$ slodps/index.php?q=$1 [L]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment