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

Improved install script

Fixed #115
parent 163e8f3a
No related branches found
No related tags found
No related merge requests found
...@@ -120,25 +120,32 @@ echo >> $parent_htaccess ...@@ -120,25 +120,32 @@ echo >> $parent_htaccess
newBase=`echo $basedir|sed -e "s|https\{0,1\}://[^\/]*||g"` newBase=`echo $basedir|sed -e "s|https\{0,1\}://[^\/]*||g"`
echo "RewriteBase $newBase" >> $parent_htaccess echo "RewriteBase $newBase" >> $parent_htaccess
cat $root_htaccess >> $parent_htaccess cat $root_htaccess >> $parent_htaccess
echo "RewriteRule ^(.+)\$ $1/index.php?q=\$1 [L]" >> $parent_htaccess echo "RewriteRule ^(.+)\$ $home/index.php?q=\$home [L]" >> $parent_htaccess
echo "</IfModule>" >> $parent_htaccess echo "</IfModule>" >> $parent_htaccess
mkdir cache mkdir -p cache
cp -r doc/examples/originalComponents components cp -r doc/examples/originalComponents components
mkdir -p components/uris mkdir -p components/uris
bold=`tput bold` bold=`tput bold`
normal=`tput sgr0` normal=`tput sgr0`
wwwUser=`ps aux|egrep "apache|httpd|www" |egrep -v "grep|root"|awk '{print $1}'|uniq`
echo echo
echo " *** ATTENTION ***" echo " *** ATTENTION ***"
echo echo
echo "LODSPeaKr needs the web server to have write permissions for $1/cache/ and $1/meta/." echo "LODSPeaKr needs the web server to have write permissions for $home/cache/ and $home/meta/."
echo echo
echo echo
echo "Common ways of doing this:" echo "Common ways of doing this:"
echo " ${bold}chown -R www-apache $1/cache $1/meta${normal} (find the name of the apache user in your system)" if [ "$wwwUser" != "" ]; then
echo " ${bold}chown -R apache $1/cache $1/meta${normal} (find the name of the apache user in your system)" echo " ${bold}sudo chown -R $wwwUser $home/cache $home/meta${normal}"
echo " ${bold}chown -R www-data $1/cache $1/meta${normal} (find the name of the apache user in your system)" echo "OR"
echo " ${bold}chmod -R g+w $1/cache $1/meta${normal} (if you have a group in common with the apache user)" echo " ${bold}sudo chmod -R 777 $home/cache $home/meta${normal} (highly discouraged but useful to test when everything fails. It shouldn't be used in production sites)"
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)" else
echo " ${bold}chown -R www-apache $home/cache $home/meta${normal} (find the name of the apache user in your system)"
echo " ${bold}chown -R apache $home/cache $home/meta${normal} (find the name of the apache user in your system)"
echo " ${bold}chown -R www-data $home/cache $home/meta${normal} (find the name of the apache user in your system)"
echo " ${bold}chmod -R g+w $home/cache $home/meta${normal} (if you have a group in common with the apache user)"
echo " ${bold}chmod -R 777 $home/cache $home/meta${normal} (highly discouraged but useful to test when everything fails. It shouldn't be used in production sites)"
fi
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
......
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