mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUG Fix sake path lookup to find vendor framework
Remove legacy sapphire lookup
This commit is contained in:
parent
d876e36424
commit
5ccbabd36c
20
sake
20
sake
@ -24,12 +24,12 @@ else
|
||||
directory="$PWD"
|
||||
base=.
|
||||
for (( n=${#slashes}; n>0; --n )) do
|
||||
if [ -d "$directory/framework" ]; then
|
||||
framework="$directory/framework"
|
||||
if [ -d "$directory/vendor/silverstripe/framework" ]; then
|
||||
framework="$directory/vendor/silverstripe/framework"
|
||||
|
||||
break
|
||||
elif [ -d "$directory/sapphire" ]; then
|
||||
framework="$directory/sapphire"
|
||||
elif [ -d "$directory/framework" ]; then
|
||||
framework="$directory/framework"
|
||||
|
||||
break
|
||||
fi
|
||||
@ -74,20 +74,20 @@ if [ "$1" = "-start" ]; then
|
||||
echo "You need to install the 'daemon' tool. In debian, go 'sudo apt-get install daemon'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -f $base/$2.pid ]; then
|
||||
echo "Starting service $2 $3"
|
||||
touch $base/$2.pid
|
||||
pidfile=`realpath $base/$2.pid`
|
||||
|
||||
|
||||
outlog=$base/$2.log
|
||||
errlog=$base/$2.err
|
||||
|
||||
echo "Logging to $outlog"
|
||||
|
||||
|
||||
sake=`realpath $0`
|
||||
base=`realpath $base`
|
||||
|
||||
|
||||
# if third argument is not explicitly given, copy from second argument
|
||||
if [ "$3" = "" ]; then
|
||||
url=$2
|
||||
@ -95,7 +95,7 @@ if [ "$1" = "-start" ]; then
|
||||
url=$3
|
||||
fi
|
||||
|
||||
# TODO: Give a globally unique processname by including the projectname as well
|
||||
# TODO: Give a globally unique processname by including the projectname as well
|
||||
processname=$2
|
||||
|
||||
daemon -n $processname -r -D $base --pidfile=$pidfile --stdout=$outlog --stderr=$errlog $sake $url
|
||||
@ -109,7 +109,7 @@ if [ "$1" = "-stop" ]; then
|
||||
pidfile=$base/$2.pid
|
||||
if [ -f $pidfile ]; then
|
||||
echo "Stopping service $2"
|
||||
|
||||
|
||||
# TODO: This is a bad way of killing the process
|
||||
kill -KILL `cat $pidfile`
|
||||
unlink $pidfile
|
||||
|
Loading…
Reference in New Issue
Block a user