Skip to content
Snippets Groups Projects
Select Git revision
  • c397f84b7d50796634ba6de0136296c9adbca67a
  • master default protected
  • json-output
  • nostr
  • 48-error-base-58-requirement-is-violated
  • no-rename
  • hugo/tx-comments
  • poka/dev
  • hugo/dev
  • tuxmain/mail
  • 0.4.3-RC2
  • 0.4.3-RC1
  • 0.4.2
  • 0.4.1
  • 0.4.0
  • 0.3.0
  • 0.2.17
  • 0.2.16
  • 0.2.15
  • 0.2.14
  • 0.2.13
  • 0.2.12
  • 0.2.10
  • 0.2.9
  • 0.2.8
  • 0.2.7
  • 0.2.6
  • 0.2.5
  • 0.2.4
  • 0.2.3
30 results

certification.rs

Blame
  • 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 != v8* ]]; then
    	  echo "$NODE v8 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