Compare commits
	
		
			4 Commits
		
	
	
		
			f7e5d4a2cb
			...
			e4021fc1a2
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| e4021fc1a2 | |||
| ff1239397c | |||
| eae752a7bf | |||
| 346d629f95 | 
| @ -491,7 +491,7 @@ Official **Boot Node** addresses: | |||||||
| /dns/bootnode70.chain.ghostchain.io/tcp/30333/p2p/12D3KooWP3h5dSdqcpvsCr7fp1jyfqDj291QDZ68a4gY6VQ8T1nW | /dns/bootnode70.chain.ghostchain.io/tcp/30333/p2p/12D3KooWP3h5dSdqcpvsCr7fp1jyfqDj291QDZ68a4gY6VQ8T1nW | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| A full list of available **Boot Nodes** can be found on [the guide page](https://blog.ghostchain.io/launching-ghost-testnet-3-0/#Boot_Node). | A full list of available **Boot Nodes** can be found on [the guide page](https://blog.ghostchain.io/launching-ghost-testnet-3-1/#Boot_Node). | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
| 
 | 
 | ||||||
| @ -507,7 +507,7 @@ Type `y` and press _Enter_ for create dedicated user for running `ghost-node`: | |||||||
| 
 | 
 | ||||||
|  |  | ||||||
| 
 | 
 | ||||||
| **DO NOT start and enable** `ghost-node.service` press _Enter_: | **DO NOT start and DO NOT enable** `ghost-node.service` (press _Enter_): | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -7,6 +7,7 @@ INSERT_KEYS=false | |||||||
| UNIT_FILE=false | UNIT_FILE=false | ||||||
| SKIP_BUILD=false | SKIP_BUILD=false | ||||||
| SET_ENVIRONMENT=false | SET_ENVIRONMENT=false | ||||||
|  | VALIDATE=false | ||||||
| EXECUTABLE_PATH="/usr/bin/" | EXECUTABLE_PATH="/usr/bin/" | ||||||
| SPECIFICATION_PATH="/etc/ghost/" | SPECIFICATION_PATH="/etc/ghost/" | ||||||
| BASE_PATH="/var/lib/ghost" | BASE_PATH="/var/lib/ghost" | ||||||
| @ -88,6 +89,7 @@ help() { | |||||||
|     echo -e "-k, --check-keys\n\tCheck if your keys are already included in 'ghosties' file." |     echo -e "-k, --check-keys\n\tCheck if your keys are already included in 'ghosties' file." | ||||||
|     echo -e "-y, --insert-keys\n\tInsert session keys to the keystore via JSON RPC." |     echo -e "-y, --insert-keys\n\tInsert session keys to the keystore via JSON RPC." | ||||||
|     echo -e "-r, --release\n\tCompile node with '--release' flag." |     echo -e "-r, --release\n\tCompile node with '--release' flag." | ||||||
|  |     echo -e "-v, --validate\n\tManipulate '--validate' flag in CLI_ARGS." | ||||||
|     echo -e "-p, --profile\n\tCompile node with '--profile [PROFILE]' flag." |     echo -e "-p, --profile\n\tCompile node with '--profile [PROFILE]' flag." | ||||||
|     echo -e "-f, --features\n\tCompilation features '--features=\"FEATURE1,FEATURE2\"'" |     echo -e "-f, --features\n\tCompilation features '--features=\"FEATURE1,FEATURE2\"'" | ||||||
|     echo -e "-e, --executable-path\n\tPath to the executable ('/usr/lib/' is default)." |     echo -e "-e, --executable-path\n\tPath to the executable ('/usr/lib/' is default)." | ||||||
| @ -133,6 +135,9 @@ while [ $# -gt 0 ]; do | |||||||
|             RELEASE="--release" |             RELEASE="--release" | ||||||
|             TARGET="release" |             TARGET="release" | ||||||
|             ;; |             ;; | ||||||
|  |         --validate|-v) | ||||||
|  |             VALIDATE=true | ||||||
|  |             ;; | ||||||
|         --profile*|-p*) |         --profile*|-p*) | ||||||
|             if [[ "$1" != *=* ]]; then shift; fi |             if [[ "$1" != *=* ]]; then shift; fi | ||||||
|             RELEASE="--profile=${1#*=}" |             RELEASE="--profile=${1#*=}" | ||||||
| @ -263,6 +268,32 @@ if [[ ! -z $RELEASE ]]; then | |||||||
|     fi |     fi | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
|  | if [[ $VALIDATE = true ]]; then | ||||||
|  |     cli_args=$(cat /etc/default/ghost) | ||||||
|  |     if prompt "[?] turn on validator mode?"; then | ||||||
|  |         if [[ $cli_args == *"--validator"* ]]; then | ||||||
|  |             echo "[+] '--validator' flag already exists in CLI_ARGS, check /etc/default/ghost" | ||||||
|  |         else | ||||||
|  |             cli_args="${cli_args%?} --validator\"" | ||||||
|  |             echo "[+] '--validator' flag inserted to CLI_ARGS, check /etc/default/ghost" | ||||||
|  |         fi | ||||||
|  |     else | ||||||
|  |         cli_args=${cli_args// --validator/} | ||||||
|  |         echo "[+] '--validator' flag removed" | ||||||
|  |     fi | ||||||
|  | 
 | ||||||
|  |     echo "[+] trying to store CLI updated arguments to '/etc/default/ghost'" | ||||||
|  |     sudo echo "$cli_args" > /etc/default/ghost | ||||||
|  |     echo "[+] updated CLI arguments stored in '/etc/default/ghost'" | ||||||
|  | 
 | ||||||
|  |     if prompt "[?] do you want to restart 'ghost-node.service' now?"; then | ||||||
|  |         sudo systemctl status ghost-node.service | ||||||
|  |         echo "[+] 'ghost-node.service' succefully restarted, new CLI_ARGS applied" | ||||||
|  |     else | ||||||
|  |         echo "[+] don't forget to restart ghost node service manually" | ||||||
|  |     fi | ||||||
|  | fi | ||||||
|  | 
 | ||||||
| if [[ $MAKE_GLOBAL = true ]]; then | if [[ $MAKE_GLOBAL = true ]]; then | ||||||
|     cd $PROJECT_FOLDER |     cd $PROJECT_FOLDER | ||||||
|     echo "[+] trying to copy executable to '$EXECUTABLE_PATH'" |     echo "[+] trying to copy executable to '$EXECUTABLE_PATH'" | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user