Skip to content
Snippets Groups Projects
Select Git revision
  • master
  • elois-substrate-v0.9.23
  • elois-technical-commitee
  • elois-opti-cert
  • release/runtime-200
  • elois-fix-85
  • elois-rework-certs
  • elois-remove-renewable-period
  • poc-oneshot-accounts
  • hugo-cucumber-identity
  • elois-ci-binary-release
  • distance
  • release/runtime-100
  • ud-time-64
  • elois-duniter-storage
  • elois-compose-metrics
  • elois-smoldot
  • no-bootnodes
  • ts-types
  • runtime-201
  • runtime-200
  • runtime-105
  • runtime-104
  • runtime-103
  • runtime-102
  • runtime-101
  • v0.1.0
  • runtime-100
28 results

README.md

Blame
  • Forked from nodes / rust / Duniter v2S
    Source project has a limited visibility.
    duniter.sh 834 B
    #!/bin/bash
    
    ##########################
    #    DUNITER EXECUTABLE
    #
    # Wraps bin/duniter that is called with Node.js
    #
    
    DEB_PACKAGING=
    
    if [[ $DEB_PACKAGING ]]; then
      DUNITER_DIR=/opt/duniter/
    fi
    
    duniter() {
    
    	local NODE
    	local LOGS_FILE
    
    	if [ -z "$DEV_MODE" ]; then
    
    		### Production mode
    		if [[ -d $DUNITER_DIR/node ]]; then
    			NODE=$DUNITER_DIR/node/bin/node
    	  else
    	    echo "Node.js is not embedded in this version of Duniter"
    	    return
    		fi;
    	else
    
    		### Cheating with DEV mode
    		DUNITER_DIR=`pwd`
    		NODE=node
    	fi
    
    	VERSION=`$NODE -v`
    
    	if [[ $VERSION != v6* ]]; then
    	  echo "$NODE v6 is required";
    	else
    
    	  # Calls duniter JS command
    	  cd $DUNITER_DIR
    	  $NODE "$DUNITER_DIR/bin/duniter" "$@"
    
    	fi;
    }
    
    # If the script was launched with parameters, try to launch the Duniter command
    if [ ! -z $1 ]; then
    	duniter "$@"
    fi