Skip to content
Snippets Groups Projects
Commit 7dd5c0c6 authored by alvaro's avatar alvaro
Browse files

Fixed bug in install.sh

parent 294a46ae
No related branches found
No related tags found
No related merge requests found
...@@ -5,10 +5,10 @@ parent_htaccess="../.htaccess" ...@@ -5,10 +5,10 @@ parent_htaccess="../.htaccess"
settings_file="settings.inc.php" settings_file="settings.inc.php"
metadb="db.sqlite" metadb="db.sqlite"
basedir="http://localhost/my/data/" basedir="http://localhost/my/data"
home=`basename \`pwd\`` # 'lodspeakr', the directory from git clone home=`basename \`pwd\`` # 'lodspeakr', the directory from git clone
ns=$basedir ns=$basedir
endpoint="http://localhost/sparql?" endpoint="http://localhost/sparql"
everything_ok="n" everything_ok="n"
if [ -e "$parent_htaccess" ]; then if [ -e "$parent_htaccess" ]; then
...@@ -43,6 +43,7 @@ while [ "$everything_ok" != "y" ]; do ...@@ -43,6 +43,7 @@ while [ "$everything_ok" != "y" ]; do
read -u 1 aux_ns read -u 1 aux_ns
echo "" echo ""
if [ "$aux_ns" != "" ]; then if [ "$aux_ns" != "" ]; then
aux_ns="`echo $aux_ns | sed 's/\/$//'`/" # remove any ending slash and append one.
ns=$aux_ns ns=$aux_ns
fi fi
...@@ -51,7 +52,7 @@ while [ "$everything_ok" != "y" ]; do ...@@ -51,7 +52,7 @@ while [ "$everything_ok" != "y" ]; do
if [[ "$basedir" =~ ^"$ns" ]]; then if [[ "$basedir" =~ ^"$ns" ]]; then
external="false" external="false"
else else
external=$ns external="\$conf['ns']['local']"
extra="\$conf['ns']['base'] = '$basedir';" extra="\$conf['ns']['base'] = '$basedir';"
fi fi
...@@ -92,7 +93,6 @@ LODSPEAKR_HOME=`pwd`/ ...@@ -92,7 +93,6 @@ LODSPEAKR_HOME=`pwd`/
\$conf['home'] = '$LODSPEAKR_HOME'; \$conf['home'] = '$LODSPEAKR_HOME';
\$conf['basedir'] = '$basedir'; \$conf['basedir'] = '$basedir';
\$conf['debug'] = false; \$conf['debug'] = false;
\$conf['mirror_external_uris'] = '$external';
/*ATTENTION: By default this application is available to /*ATTENTION: By default this application is available to
* be exported and copied (its configuration) * be exported and copied (its configuration)
...@@ -104,6 +104,8 @@ LODSPEAKR_HOME=`pwd`/ ...@@ -104,6 +104,8 @@ LODSPEAKR_HOME=`pwd`/
#If you want to add/overrid a namespace, add it here #If you want to add/overrid a namespace, add it here
\$conf['ns']['local'] = '$ns'; \$conf['ns']['local'] = '$ns';
$extra $extra
\$conf['mirror_external_uris'] = $external;
?>" ?>"
echo "$content" > $settings_file echo "$content" > $settings_file
chmod 644 $settings_file chmod 644 $settings_file
...@@ -119,7 +121,8 @@ echo "RewriteRule ^(.+)\$ $1/index.php?q=\$1 [L]" >> $parent_htaccess ...@@ -119,7 +121,8 @@ echo "RewriteRule ^(.+)\$ $1/index.php?q=\$1 [L]" >> $parent_htaccess
mkdir cache mkdir cache
cp -r doc/examples/originalComponents components cp -r doc/examples/originalComponents components
mkdir -p components/uris mkdir -p components/uris
bold=`tput bold`
normal=`tput sgr0`
echo echo
echo " *** ATTENTION ***" echo " *** ATTENTION ***"
echo echo
...@@ -127,10 +130,17 @@ echo "LODSPeaKr needs the web server to have write permissions for $1/cache/ and ...@@ -127,10 +130,17 @@ echo "LODSPeaKr needs the web server to have write permissions for $1/cache/ and
echo echo
echo echo
echo "Common ways of doing this:" echo "Common ways of doing this:"
echo " chown -R www-apache $1/cache $1/meta (find the name of the apache user in your system)" echo " ${bold}chown -R www-apache $1/cache $1/meta${normal} (find the name of the apache user in your system)"
echo " chmod -R g+w $1/cache $1/meta (if you have a group in common with the apache user)" echo " ${bold}chown -R apache $1/cache $1/meta${normal} (find the name of the apache user in your system)"
echo " chmod -R 777 $1/cache $1/meta (highly discouraged but useful to test when everything fails. It shouldn't be used in production sites)" echo " ${bold}chown -R www-data $1/cache $1/meta${normal} (find the name of the apache user in your system)"
echo " ${bold}chmod -R g+w $1/cache $1/meta${normal} (if you have a group in common with the apache user)"
echo " ${bold}chmod -R 777 $1/cache $1/meta${normal} (highly discouraged but useful to test when everything fails. It shouldn't be used in production sites)"
echo echo
echo "Please give the server write permissions. Otherwise, LODSPeaKr will not work." echo "Please give the server write permissions. Otherwise, LODSPeaKr will not work."
echo echo
echo "You can now visit $basedir to navigate through your data." echo
echo
echo "--------------------------------------------------------------------------------------------------------"
echo "You can now visit ${bold}$basedir${normal} to navigate through your data."
echo "--------------------------------------------------------------------------------------------------------"
echo
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