diff --git a/Doxygen/Examples.ArangoDB/arangosh-start b/Doxygen/Examples.ArangoDB/arangosh-start index fb691d2a92..2423aca09e 100644 --- a/Doxygen/Examples.ArangoDB/arangosh-start +++ b/Doxygen/Examples.ArangoDB/arangosh-start @@ -6,11 +6,11 @@ \__,_|_| \__,_|_| |_|\__, |\___/|___/_| |_| |___/ -Welcome to arangosh 0.5.0. Copyright (c) 2012 triAGENS GmbH. +Welcome to arangosh 1.x.y. Copyright (c) 2012 triAGENS GmbH. Using Google V8 3.9.4 JavaScript engine. Using READLINE 6.1. -Connected to Arango DB 127.0.0.1:8529 Version 0.5.0 +Connected to Arango DB 127.0.0.1:8529 Version 1.x.y ------------------------------------- Help ------------------------------------- Predefined objects: diff --git a/Doxygen/Examples.ArangoDB/option-database-directory b/Doxygen/Examples.ArangoDB/option-database-directory index 6326effea6..fc6f577df2 100644 --- a/Doxygen/Examples.ArangoDB/option-database-directory +++ b/Doxygen/Examples.ArangoDB/option-database-directory @@ -1,5 +1,4 @@ > ./arangod /tmp/vocbase 2012-05-13T12:37:08Z [8145] INFO using built-in JavaScript startup files -2012-05-13T12:37:08Z [8145] INFO ArangoDB (version 0.5.0) is ready for business -2012-05-13T12:37:08Z [8145] INFO HTTP client/admin port: 127.0.0.1:8529 +2012-05-13T12:37:08Z [8145] INFO ArangoDB (version 1.x.y) is ready for business 2012-05-13T12:37:08Z [8145] INFO Have Fun! diff --git a/Doxygen/Examples.ArangoDB/start-emergency-console b/Doxygen/Examples.ArangoDB/start-emergency-console index 38d80cb4c0..4e70f40a85 100644 --- a/Doxygen/Examples.ArangoDB/start-emergency-console +++ b/Doxygen/Examples.ArangoDB/start-emergency-console @@ -1,5 +1,5 @@ > ./arangod --console --log error /tmp/vocbase -ArangoDB shell [V8 version 3.9.4, DB version 0.5.0] +ArangoDB shell [V8 version 3.9.4, DB version 1.x.y] arango> 1 + 2; 3 diff --git a/Installation/arangod-local.conf b/Installation/arangod-local.conf new file mode 100644 index 0000000000..961ea58bf4 --- /dev/null +++ b/Installation/arangod-local.conf @@ -0,0 +1,24 @@ +[database] +directory= /tmp/ARANGO/var/arangodb +# maximal-journal-size=33554432 +# remove-on-drop=true + +[server] +http-port = localhost:8529 +http-auth = no +disable-admin-interface = no +admin-port = localhost:8530 +admin-directory= ./html/admin +threads = 5 + +[scheduler] +threads = 3 + +[javascript] +action-directory= ./js/actions/system +modules-path = ./js/server/modules;./js/common/modules + +[log] +level = info +severity = human +# file = /tmp/arangod.log diff --git a/Installation/arangodb.list b/Installation/arangodb.list index f014b1e503..56bc335ac5 100644 --- a/Installation/arangodb.list +++ b/Installation/arangodb.list @@ -24,8 +24,8 @@ $release=${arangodb_release} ################################################################################ d 0755 ${susr} ${sgrp} /etc/arangodb - -d 0755 ${susr} ${sgrp} /etc/arangodb/${vers_dir} - -f 0644 ${susr} ${sgrp} /etc/arangodb/${vers_dir}/arangod.conf.template ${project_dir}/Installation/arangod.conf.in +d 0755 ${susr} ${sgrp} /etc/arangodb/ - +c 0644 ${susr} ${sgrp} /etc/arangodb/arangod.conf ${project_dir}/Installation/arangod.conf f 0755 ${susr} ${sgrp} ${sbindir}/arangod-${arangodb_version} ${project_dir}/bin/arangod l 000 ${rusr} ${rgrp} ${sbindir}/arangod ${sbindir}/arangod-${arangodb_version} @@ -54,9 +54,9 @@ d 0755 ${susr} ${sgrp} /var/log/arangodb - ## Pre/Post Install ################################################################################ -%postinstall < /etc/arangodb/arangod.conf -EOF +## ----------------------------------------------------------------------------- +## MAC OS X +## ----------------------------------------------------------------------------- %ifdef macosx d 0755 ${rusr} ${rgrp} /Library/LaunchDaemons/ - @@ -73,6 +73,10 @@ launchctl stop de.triagens.arango launchctl unload /Library/LaunchDaemons/org.arangodb.plist EOF +## ----------------------------------------------------------------------------- +## LINUX +## ----------------------------------------------------------------------------- + %else %preinstall </dev/null || groupadd -r arango @@ -80,19 +84,32 @@ getent passwd arango >/dev/null || useradd -r -g arango -d ${static_dir} -s /bin EOF %endif -%ifdef insserv +## ----------------------------------------------------------------------------- +## CHKCONF +## ----------------------------------------------------------------------------- + +%ifdef chkconf +f 0755 ${rusr} ${rgrp} ${initdir}/arangod ${project_dir}/Installation/${START_SCRIPT} + %postinstall <1 > /dev/null -exit 0 +chkconfig --level ${runlevels} arangod on EOF %preremove <1 > /dev/null -test -x /sbin/insserv && /sbin/insserv -r /etc/init.d/arango 2&>1 > /dev/null -exit 0 +chkconfig --del arangod +rcarangod stop || true EOF -%endif + +%else %system linux -i 0755 ${rusr} ${rgrp} arango ${project_dir}/Installation/${START_SCRIPT} ${runlevels} -l 000 ${rusr} ${rgrp} ${sbindir}/rcarango /etc/init.d/arango +i 0755 ${rusr} ${rgrp} arangod ${project_dir}/Installation/${START_SCRIPT} runlevel(${runlevels}) + +%endif + +## ----------------------------------------------------------------------------- +## RC skript +## ----------------------------------------------------------------------------- + +%system linux +l 000 ${rusr} ${rgrp} ${sbindir}/rcarangod /etc/init.d/arangod diff --git a/Makefile.files b/Makefile.files index 28bcb75102..e26d80e9e9 100644 --- a/Makefile.files +++ b/Makefile.files @@ -124,6 +124,7 @@ WIKI = \ SimpleQueries \ UserManual \ UserManualBasics \ + UserManualArangosh \ Aql \ AqlExamples \ jsUnity diff --git a/Makefile.in b/Makefile.in index aea2742986..b5a658cc89 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1288,6 +1288,7 @@ WIKI = \ SimpleQueries \ UserManual \ UserManualBasics \ + UserManualArangosh \ Aql \ AqlExamples \ jsUnity diff --git a/Makefile.local b/Makefile.local index b0ed164f59..9576d1a3c7 100644 --- a/Makefile.local +++ b/Makefile.local @@ -32,6 +32,7 @@ publish-pdf: $(OUTPUT_FOLDER) scp Doxygen/latex/install-manual.pdf $(OUTPUT_FOLDER) scp Doxygen/latex/user-manual.pdf $(OUTPUT_FOLDER) scp Doxygen/latex/ref-manual.pdf $(OUTPUT_FOLDER) + scp arangod/Documentation/arangodb_1.0_shell_reference_card.pdf $(OUTPUT_FOLDER) $(OUTPUT_FOLDER): mkdir -p $(OUTPUT_FOLDER) diff --git a/arangod/Documentation/arangodb_1.0_shell_reference_card.docx b/arangod/Documentation/arangodb_1.0_shell_reference_card.docx new file mode 100644 index 0000000000..f5c3c756ea Binary files /dev/null and b/arangod/Documentation/arangodb_1.0_shell_reference_card.docx differ diff --git a/arangod/Documentation/arangodb_1.0_shell_reference_card.pdf b/arangod/Documentation/arangodb_1.0_shell_reference_card.pdf new file mode 100644 index 0000000000..c5553a1a01 Binary files /dev/null and b/arangod/Documentation/arangodb_1.0_shell_reference_card.pdf differ diff --git a/arangod/Documentation/command-line-options.dox b/arangod/Documentation/command-line-options.dox index 22614bc674..1c06bc8e1d 100644 --- a/arangod/Documentation/command-line-options.dox +++ b/arangod/Documentation/command-line-options.dox @@ -188,10 +188,11 @@ /// @copydetails triagens::rest::ApplicationEndpointServer::_sslCipherList /// /// @anchor CommandLineArangoDisableAdminInterface -/// @CMDOPT{--server.disable-admin-interface} +/// @CMDOPT{--disable-admin-interface @CA{value}} /// -/// If this option is specified, then the HTML admininstration interface at -/// URL http://server:port/ will be disabled and cannot used by any user at all. +/// If this option is specified and @CA{value} is @LIT{true}, then the HTML +/// administration interface at URL @LIT{http://server:port/} will be disabled +/// and cannot used by any user at all. /// /// @anchor CommandLineArangoDirectory /// @copydetails triagens::arango::ArangoServer::_databasePath diff --git a/arangod/Documentation/home.dox b/arangod/Documentation/home.dox index cf3bf734e0..2a5394503a 100644 --- a/arangod/Documentation/home.dox +++ b/arangod/Documentation/home.dox @@ -49,17 +49,18 @@ /////////////////////////////////////////////////////////////////////////// /// ///
    -///
  • @ref UserManual @ifnot XML @SPC(pdf) @endif
  • -///
  • @ref DbaManual @ifnot XML @SPC(pdf) @endif
  • -///
  • @ref ImpManual @ifnot XML @SPC(pdf) @endif
  • +///
  • @ref UserManual @ifnot XML @SPC(pdf) @endif
  • +///
  • @ref DbaManual @ifnot XML @SPC(pdf) @endif
  • +///
  • @ref ImpManual @ifnot XML @SPC(pdf) @endif
  • ///
  • @ref Glossary
  • +/// @ifnot XML
  • Cheat Sheet
  • @endif ///
/// /// @section ArangoDBAdminManual ArangoDB's Administrator Manuals (Version @VERSION) //////////////////////////////////////////////////////////////////////////////////// /// ///
    -///
  • @ref InstallManual @ifnot XML @SPC(pdf) @endif
  • +///
  • @ref InstallManual @ifnot XML @SPC(pdf) @endif
  • ///
  • @ref Glossary
  • ///
/// @@ -67,8 +68,8 @@ ////////////////////////////////////////////////////////////////////////////// /// ///
    -///
  • @ref ImplementorManual @ifnot XML @SPC(pdf) @endif
  • -///
  • @ref RefManual @ifnot XML @SPC(pdf) @endif
  • +///
  • @ref ImplementorManual @ifnot XML @SPC(pdf) @endif
  • +///
  • @ref RefManual @ifnot XML @SPC(pdf) @endif
  • ///
  • @ref Glossary
  • ///
/// diff --git a/arangod/Documentation/user-manual.dox b/arangod/Documentation/user-manual.dox index b70dfadf0b..ac5e402f89 100644 --- a/arangod/Documentation/user-manual.dox +++ b/arangod/Documentation/user-manual.dox @@ -25,6 +25,10 @@ /// @author Copyright 2012, triAGENS GmbH, Cologne, Germany //////////////////////////////////////////////////////////////////////////////// +// ----------------------------------------------------------------------------- +// --SECTION-- USER MANUAL +// ----------------------------------------------------------------------------- + //////////////////////////////////////////////////////////////////////////////// /// @page UserManual ArangoDB's User Manual /// @@ -32,6 +36,7 @@ ///
    ///
  • @ref UserManualBasics
  • ///
  • @ref FirstStepsArangoDB
  • +///
  • @ref UserManualArangosh
  • ///
  • @ref ShellCollection
  • ///
  • @ref ShellDocument
  • ///
  • @ref ShellEdge
  • @@ -45,6 +50,7 @@ /// @else /// @copydetails UserManualBasicsTOC /// @copydetails FirstStepsArangoDBTOC +/// @copydetails UserManualArangoshTOC /// @copydetails ShellCollectionTOC /// @copydetails ShellDocumentTOC /// @copydetails ShellEdgeTOC @@ -54,6 +60,10 @@ /// @endif //////////////////////////////////////////////////////////////////////////////// +// ----------------------------------------------------------------------------- +// --SECTION-- USER MANUAL BASICS +// ----------------------------------------------------------------------------- + //////////////////////////////////////////////////////////////////////////////// /// @page UserManualBasicsTOC /// @@ -227,7 +237,8 @@ /// After the server has been @ref UserManualServerStartStop "started", /// you can use the ArangoDB shell (arangosh) to administrate the server. Without /// any arguments, the ArangoDB shell will try to contact the server -/// on port 8529 on the localhost. +/// on port 8529 on the localhost. For more information see @ref +/// UserManualArangosh. /// /// @TINYEXAMPLE{arangosh-start,starting the shell} /// @@ -258,6 +269,82 @@ /// @EXAMPLE{start-emergency-console,emergency console} //////////////////////////////////////////////////////////////////////////////// +// ----------------------------------------------------------------------------- +// --SECTION-- USER MANUAL ARANGOSH +// ----------------------------------------------------------------------------- + +//////////////////////////////////////////////////////////////////////////////// +/// @page UserManualArangoshTOC +/// +///
      +///
    • @ref UserManualArangosh +///
    • +///
    +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +/// @page UserManualArangosh The Arango Shell +/// +/// @EMBEDTOC{UserManualArangoshTOC} +/// +/// @section UserManualArangoshOutput Arango Shell Output +///////////////////////////////////////////////////////// +/// +/// In general the Arango Shells prints its as output to standard output channel +/// using the JSON stringifier. +/// +/// @code +/// arangosh> db.five.all().toArray(); +/// [{ _id : "2223655/3665447", _rev : 3665447, name : "one" }, +/// { _id : "2223655/3730983", _rev : 3730983, name : "two" }, +/// { _id : "2223655/3862055", _rev : 3862055, name : "four" }, +/// { _id : "2223655/3993127", _rev : 3993127, name : "three" }] +/// @endcode +/// +/// @FUN{start_pretty_print()} +/// +/// While the standard JSON stringifier is very concise it is hard to read. +/// Calling the function @FN{start_pretty_print} will enable the pretty printer +/// which formats the output in a human readable way. +/// +/// @code +/// arangosh> start_pretty_print(); +/// using pretty printing +/// arangosh> db.five.all().toArray(); +/// [ +/// { +/// _id : "2223655/3665447", +/// _rev : 3665447, +/// name : "one" +/// }, +/// { +/// _id : "2223655/3730983", +/// _rev : 3730983, +/// name : "two" +/// }, +/// { +/// _id : "2223655/3862055", +/// _rev : 3862055, +/// name : "four" +/// }, +/// { +/// _id : "2223655/3993127", +/// _rev : 3993127, +/// name : "three" +/// } +/// ] +/// @endcode +/// +/// @FUN{start_pretty_print()} +/// +/// The functions disable the pretty printer, switching back to the standard +/// JSON output format. +//////////////////////////////////////////////////////////////////////////////// + +// ----------------------------------------------------------------------------- +// --SECTION-- END-OF-FILE +// ----------------------------------------------------------------------------- + // Local Variables: // mode: c++ // mode: outline-minor diff --git a/arangod/RestServer/ArangoServer.cpp b/arangod/RestServer/ArangoServer.cpp old mode 100755 new mode 100644 index bfdb400447..277e467b85 --- a/arangod/RestServer/ArangoServer.cpp +++ b/arangod/RestServer/ArangoServer.cpp @@ -436,9 +436,11 @@ void ArangoServer::buildApplicationServer () { // for this server we display our own options such as port to use // ............................................................................. + bool disableAdminInterface = false; + additional["Server Options:help-admin"] ("server.disable-authentication", &_disableAuthentication, "disable authentication for ALL client requests") - ("server.disable-admin-interface", "turn off the HTML admin interface") + ("server.disable-admin-interface", &disableAdminInterface, "turn off the HTML admin interface") ; additional["THREAD Options:help-admin"] @@ -469,7 +471,7 @@ void ArangoServer::buildApplicationServer () { // disable access to the HTML admin interface // ............................................................................. - if (_applicationServer->programOptions().has("server.disable-admin-interface")) { + if (disableAdminInterface) { _applicationAdminServer->allowAdminDirectory(false); } diff --git a/arangod/RestServer/arango.cpp b/arangod/RestServer/arango.cpp old mode 100755 new mode 100644 diff --git a/build.sh b/build.sh index bffd51a39b..f9d6320bc5 100755 --- a/build.sh +++ b/build.sh @@ -7,8 +7,8 @@ echo . config/detect_distro.sh -OPTIONS="--disable-dependency-tracking --enable-relative=devel" -PREFIX="--prefix=/usr --sysconfdir=/etc" +OPTIONS="--disable-dependency-tracking --disable-relative" +PREFIX="--prefix=/usr --localstatedir=/var --sysconfdir=/etc" RESULTS="arangod arangosh arangoimp" USE_ICECC="no" diff --git a/html/admin/js/master.js b/html/admin/js/master.js index e64bae4243..b0f3e81f88 100644 --- a/html/admin/js/master.js +++ b/html/admin/js/master.js @@ -10,7 +10,7 @@ var welcomeMSG = "" + " \\__,_|_| \\__,_|_| |_|\\__, |\\___/|___/_| |_| \n" + " |___/ \n" + " \n" -+ "Welcome to arangosh 1.0.beta Copyright (c) 2012 triAGENS GmbH." ++ "Welcome to arangosh Copyright (c) 2012 triAGENS GmbH."; var existingCharts; var statDivCount; @@ -2561,7 +2561,7 @@ function drawConnections (placeholder, granularity) { } }); - $(placeholder).bind('plothover', function(event, coords, item) { + $(placeholder).bind('plothover', function(event, coords, item) { var self = $(this), api = $(this).qtip(), previousPoint, content; @@ -2586,7 +2586,7 @@ function drawConnections (placeholder, granularity) { api.elements.tooltip.stop(1, 1); // Show the tooltip, passing the coordinates api.show(coords); - } + } }); } @@ -2680,7 +2680,7 @@ function drawRequests (placeholder, granularity) { } }); - $(placeholder).bind('plothover', function(event, coords, item) { + $(placeholder).bind('plothover', function(event, coords, item) { var self = $(this), api = $(this).qtip(), previousPoint, content; @@ -2709,7 +2709,7 @@ function drawRequests (placeholder, granularity) { api.elements.tooltip.stop(1, 1); // Show the tooltip, passing the coordinates api.show(coords); - } + } }); } diff --git a/lib/Rest/AnyServer.cpp b/lib/Rest/AnyServer.cpp index d5a7e6e569..f90963bac7 100644 --- a/lib/Rest/AnyServer.cpp +++ b/lib/Rest/AnyServer.cpp @@ -149,8 +149,7 @@ static void WritePidFile (string const& pidFile, int pid) { /// @brief forks a new process //////////////////////////////////////////////////////////////////////////////// -static int forkProcess (string const& pidFile, string const& workingDirectory, string& current, ApplicationServer* applicationServer) { - CheckPidFile(pidFile); +static int forkProcess (string const& workingDirectory, string& current, ApplicationServer* applicationServer) { // fork off the parent process pid_t pid = fork(); @@ -166,7 +165,7 @@ static int forkProcess (string const& pidFile, string const& workingDirectory, s // if we got a good PID, then we can exit the parent process if (pid > 0) { LOGGER_DEBUG << "started child process with pid " << pid; - return 0; + return pid; } // reset the logging @@ -184,9 +183,6 @@ static int forkProcess (string const& pidFile, string const& workingDirectory, s exit(EXIT_FAILURE); } - // write pid file - WritePidFile(pidFile, sid); - // store current working directory int err = 0; current = FileUtils::currentDirectory(&err); @@ -212,7 +208,7 @@ static int forkProcess (string const& pidFile, string const& workingDirectory, s close(STDOUT_FILENO); close(STDERR_FILENO); - return 1; + return 0; } //////////////////////////////////////////////////////////////////////////////// @@ -339,16 +335,18 @@ int AnyServer::startupSupervisor () { LOGGER_INFO << "starting up in supervisor mode"; + CheckPidFile(_pidFile); + string current; - int result = forkProcess(_pidFile, _workingDirectory, current, safe_cast(_applicationServer)); + int result = forkProcess(_workingDirectory, current, safe_cast(_applicationServer)); // main process - if (result == 0) { + if (result != 0) { return 0; } // child process - else if (result == 1) { + else { time_t startTime = time(0); time_t t; bool done = false; @@ -373,10 +371,14 @@ int AnyServer::startupSupervisor () { prctl(PR_SET_NAME, title, 0, 0, 0); #endif + WritePidFile(_pidFile, pid); + int status; waitpid(pid, &status, 0); if (WIFEXITED(status)) { + + // give information about cause of death if (WEXITSTATUS(status) == 0) { LOGGER_INFO << "child " << pid << " died of natural causes"; done = true; @@ -443,6 +445,17 @@ int AnyServer::startupSupervisor () { prepareServer(); result = startupServer(); + // remove pid file + if (FileUtils::changeDirectory(current)) { + if (! FileUtils::remove(_pidFile)) { + LOGGER_ERROR << "cannot unlink pid file '" << _pidFile << "'"; + } + } + else { + LOGGER_ERROR << "cannot unlink pid file '" << _pidFile << "', because directory '" + << current << "' is missing"; + } + // and stop exit(result); } @@ -460,11 +473,6 @@ int AnyServer::startupSupervisor () { } } - // upps, - else { - exit(EXIT_FAILURE); - } - return result; } @@ -475,18 +483,22 @@ int AnyServer::startupSupervisor () { int AnyServer::startupDaemon () { LOGGER_INFO << "starting up in daemon mode"; + CheckPidFile(_pidFile); + string current; - int result = forkProcess(_pidFile, _workingDirectory, current, safe_cast(_applicationServer)); + int result = forkProcess(_workingDirectory, current, safe_cast(_applicationServer)); // main process - if (result == 0) { + if (result != 0) { #ifdef TRI_HAVE_SYS_PRCTL_H - prctl(PR_SET_NAME, "arangodb [daemon]", 0, 0, 0); + prctl(PR_SET_NAME, "arangodb [daemon]", 0, 0, 0); #endif + + WritePidFile(_pidFile, result); } // child process - else if (result == 1) { + else { // and startup server prepareServer(); @@ -504,11 +516,6 @@ int AnyServer::startupDaemon () { } } - // upps, - else { - exit(EXIT_FAILURE); - } - return result; } diff --git a/packetize.sh b/packetize.sh index 81ebb1b4f9..30e47d682d 100755 --- a/packetize.sh +++ b/packetize.sh @@ -15,7 +15,7 @@ sgrp=arango package_type="" product_name="arangodb" project_name="arangodb" -runlevels="runlevel(035)" +runlevels="035" curl_version="curl -s -o - http://localhost:8529/_api/version" # name of the epm configuration file @@ -35,20 +35,19 @@ osvers=`uname -r | awk -F"." '{print $1 "." $2}'` prefix=/usr exec_prefix=${prefix} sbindir=${exec_prefix}/sbin +initdir=/etc/init.d bindir=${exec_prefix}/bin data_dir=/var static_dir=${prefix}/share vers_dir=arango-${arangodb_version} docdir=${prefix}/share/doc/voc/${vers_dir} - echo echo "########################################################" echo "Packetize on $TRI_OS_LONG" echo "########################################################" echo - case $TRI_OS_LONG in Linux-ArchLinux-*) @@ -60,63 +59,54 @@ case $TRI_OS_LONG in echo "Using configuration for openSuSE" package_type="rpm" START_SCRIPT="rc.arangodb.OpenSuSE" - runlevels="runlevel(035)" + runlevels="035" docdir=${prefix}/share/doc/packages/voc/${vers_dir} - - # export "insserv" for the epm configuration file - export insserv="true" ;; Linux-Debian*) echo "Using configuration for Debian" package_type="deb" START_SCRIPT="rc.arangodb.Debian" - runlevels="runlevel(035)" + runlevels="035" if [ ${TRI_MACH} == "x86_64" ] ; then TRI_MACH="amd64" fi - # export "insserv" for the epm configuration file - export insserv="true" ;; Linux-CentOS-*) echo "Using configuration for Centos" package_type="rpm" START_SCRIPT="rc.arangodb.Centos" - runlevels="runlevel(0235)" + runlevels="0235" - # export "insserv" for the epm configuration file - export insserv="true" + # exports for the epm configuration file + export chkconf="true" ;; Linux-Ubuntu-*) echo "Using configuration for Ubuntu" package_type="deb" START_SCRIPT="rc.arangodb.Ubuntu" - runlevels="runlevel(02345)" + runlevels="02345" if [ ${TRI_MACH} == "x86_64" ] ; then TRI_MACH="amd64" fi - # export "insserv" for the epm configuration file - export insserv="true" ;; Linux-LinuxMint-*) echo "Using configuration for LinuxMint" package_type="deb" START_SCRIPT="rc.arangodb.Ubuntu" - runlevels="runlevel(02345)" + runlevels="02345" if [ ${TRI_MACH} == "x86_64" ] ; then TRI_MACH="amd64" fi - # export "insserv" for the epm configuration file - export insserv="true" ;; Darwin*) @@ -203,44 +193,45 @@ sudo -E mkdir -p ${hudson_base}/${archfolder}/buildroot echo echo "########################################################" echo "Export vars for epm" -echo " export arangodb_version=$arangodb_version" echo " export arangodb_release=$arangodb_release" -echo " export rusr=$rusr" -echo " export rgrp=$rgrp" -echo " export susr=$susr" -echo " export sgrp=$sgrp" -echo " export prefix=$prefix" -echo " export exec_prefix=$exec_prefix" -echo " export sbindir=$sbindir" +echo " export arangodb_version=$arangodb_version" echo " export bindir=$bindir" echo " export data_dir=$data_dir" +echo " export docdir=$docdir" +echo " export exec_prefix=$exec_prefix" +echo " export initdir=$initdir" +echo " export prefix=$prefix" +echo " export project_dir=${sfolder_name}" +echo " export rgrp=$rgrp" +echo " export runlevels=$runlevels" +echo " export rusr=$rusr" +echo " export sbindir=$sbindir" +echo " export sgrp=$sgrp" echo " export static_dir=$static_dir" +echo " export susr=$susr" echo " export vers_dir=$vers_dir" echo " export START_SCRIPT=$START_SCRIPT" -echo " export runlevels=$runlevels" -echo " export docdir=$docdir" -echo " export project_dir=${sfolder_name}" echo "########################################################" echo -export arangodb_version export arangodb_release -export rusr -export rgrp -export susr -export sgrp -export prefix -export exec_prefix -export sbindir +export arangodb_version export bindir export data_dir +export docdir +export exec_prefix +export initdir +export prefix +export project_dir=${sfolder_name} +export rgrp +export runlevels +export rusr +export sbindir +export sgrp export static_dir +export susr export vers_dir export START_SCRIPT -export runlevels -export docdir -export project_dir=${sfolder_name} - echo echo "########################################################" @@ -272,7 +263,6 @@ cp -p ${hudson_base}/${archfolder}/${product_name}*.${package_type} ${sfolder_na echo "########################################################" echo - start_server= stop_server= install_package= @@ -283,8 +273,8 @@ unmount_install_package= case $TRI_OS_LONG in Linux-openSUSE*) - start_server="" - stop_server="" + start_server="sudo /etc/init.d/arangod start" + stop_server="sudo /etc/init.d/arangod stop" install_package="sudo rpm -i ${sfolder_name}/${package_name}" remove_package="sudo rpm -e $product_name" @@ -292,32 +282,32 @@ case $TRI_OS_LONG in ;; Linux-Debian*) - start_server="" - stop_server="" + start_server="sudo /etc/init.d/arangod start" + stop_server="sudo /etc/init.d/arangod stop" install_package="sudo dpkg -i ${sfolder_name}/${package_name}" remove_package="sudo dpkg --purge $product_name" ;; Linux-CentOS-*) - start_server="" - stop_server="" + start_server="sudo /etc/init.d/arangod start" + stop_server="sudo /etc/init.d/arangod stop" install_package="sudo rpm -i ${sfolder_name}/${package_name}" remove_package="sudo rpm -e $product_name" ;; Linux-Ubuntu-*) - start_server="sudo /etc/init.d/arango start" - stop_server="sudo /etc/init.d/arango stop" + start_server="sudo /etc/init.d/arangod start" + stop_server="sudo /etc/init.d/arangod stop" install_package="sudo dpkg -i ${sfolder_name}/${package_name}" remove_package="sudo dpkg --purge $product_name" ;; Linux-LinuxMint-*) - start_server="" - stop_server="sudo /etc/init.d/arango stop" + start_server="sudo /etc/init.d/arangod start" + stop_server="sudo /etc/init.d/arangod stop" install_package="sudo dpkg -i ${sfolder_name}/${package_name}" remove_package="sudo dpkg --purge $product_name" @@ -339,7 +329,6 @@ case $TRI_OS_LONG in esac - echo echo "########################################################" echo " INSTALL TEST " @@ -384,6 +373,13 @@ fi echo "Successfully installed ${package_name}." echo "########################################################" +if [ "${start_server}x" != "x" ]; then +echo "Start" +echo " ${start_server}" +${start_server} +echo "########################################################" +fi + echo "Check process" process=$(ps aux | grep arangod | grep -v grep) echo "$process"