I have two simple shell scripts to run my solr installation in a screen and restart it on crash (sometimes a memory heap exception happens…)
startserver.sh
cd apache-solr/example
screen -S solrserver ./runner.sh
cd ../..
runner.sh
until java -jar -Xmx1024m start.jar; do
echo "server stopped with exit code $? restart..." >&2
sleep 10
done
they work just fine so far, the problem however is, that runner.sh must be executeable for the current user.
so this has to explicitly set.
i have everything in subversion, and subversion is not intelligent enough to manage access rights.
so i am looking for a solution to start the script not as executeable script in the current environment but rather pass it on to the interpreter.
something like:
/bin/bash runner.sh
another alias for that should be just . runner.sh (well than its not necessarily bash but the current users shell)
i did this with perl and php scripts before but somehow it won’t work
i have a straight forward ubuntu 10.04 lts server on an amazon instance. well i installed apache2 and some apache modules, subversion and my favorite command line editor but no major system adaptations.
it works very well with /bin/bash i must have gotten something else wrong. sorry.
Set the svn:executable property