mirror of https://gitee.com/bigwinds/arangodb
moved script
This commit is contained in:
parent
d9f9b8b65d
commit
cd1b2b6fc3
|
@ -30,8 +30,6 @@
|
|||
/// @author Copyright 2013, triAGENS GmbH, Cologne, Germany
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
const _ = require('lodash');
|
||||
const fs = require('fs');
|
||||
const joi = require('joi');
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
run
|
|
@ -0,0 +1,60 @@
|
|||
#!/bin/bash
|
||||
export PID=$$
|
||||
|
||||
if test -n "$ORIGINAL_PATH"; then
|
||||
# running in cygwin...
|
||||
PS='\'
|
||||
export EXT=".exe"
|
||||
else
|
||||
export EXT=""
|
||||
PS='/'
|
||||
fi;
|
||||
|
||||
SCRIPT="utils${PS}generateExamples.js"
|
||||
LOGFILE="out${PS}log-$PID"
|
||||
DBDIR="out${PS}data-$PID"
|
||||
|
||||
mkdir -p ${DBDIR}
|
||||
|
||||
echo Database has its data in ${DBDIR}
|
||||
echo Logfile is in ${LOGFILE}
|
||||
|
||||
if [ -z "${ARANGOD}" ]; then
|
||||
if [ -x build/bin/arangod ]; then
|
||||
ARANGOD=build/bin/arangod
|
||||
elif [ -x bin/arangosh ]; then
|
||||
ARANGOD=bin/arangod
|
||||
else
|
||||
echo "$0: cannot locate arangod"
|
||||
fi
|
||||
fi
|
||||
|
||||
${ARANGOD} \
|
||||
--configuration none \
|
||||
--cluster.agent-path bin${PS}etcd-arango${EXT} \
|
||||
--cluster.arangod-path bin${PS}arangod \
|
||||
--cluster.coordinator-config etc${PS}relative${PS}arangod-coordinator.conf \
|
||||
--cluster.dbserver-config etc${PS}relative${PS}arangod-dbserver.conf \
|
||||
--cluster.disable-dispatcher-frontend false \
|
||||
--cluster.disable-dispatcher-kickstarter false \
|
||||
--cluster.data-path cluster \
|
||||
--cluster.log-path cluster \
|
||||
--database.directory ${DBDIR} \
|
||||
--log.file ${LOGFILE} \
|
||||
--server.endpoint tcp://127.0.0.1:$PORT \
|
||||
--javascript.startup-directory js \
|
||||
--javascript.app-path js${PS}apps \
|
||||
--javascript.script $SCRIPT \
|
||||
--no-server \
|
||||
--temp-path ${PS}var${PS}tmp \
|
||||
"${ARGS[@]}" \
|
||||
|
||||
if test $? -eq 0; then
|
||||
echo "removing ${LOGFILE} ${DBDIR}"
|
||||
rm -rf ${LOGFILE} ${DBDIR}
|
||||
else
|
||||
echo "failed - don't remove ${LOGFILE} ${DBDIR} - here's the logfile:"
|
||||
cat ${LOGFILE}
|
||||
fi
|
||||
|
||||
echo Server has terminated.
|
Loading…
Reference in New Issue