-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdecenomy.sh
2813 lines (2669 loc) · 85.3 KB
/
decenomy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/bash
# DECENOMY (DMY) Masternode Multinode Script.
# Designed to automate masternode multinode installation on pre-purchased Virtual Private Servers (VPS), with maintenance features built in.
# (c) DECENOMY, 2023
# All rights reserved
# MIT License
# Term colors.
BLUE="\033[0;34m"
YELLOW="\033[0;33m"
CYAN="\033[0;36m"
PURPLE="\033[0;35m"
RED='\033[0;31m'
GREEN="\033[0;32m"
NC='\033[0m'
# Predefined Constants.
ASCII_L="--│█│█"
ASCII_R="│█│█--"
ASCII_LINE="--------------------------------------------------------------"
SCRIPVERSION=v1.0.9
SCRIPT_GITHUB=https://api.github.com/repos/decenomy/mnscript/releases/latest
SCRIPT_FILE=`curl -s $SCRIPT_GITHUB | grep "browser_download_url.*decenomy.sh" | cut -d : -f 2,3 | tr -d \" | xargs`
NODEIP=$(curl --fail --retry 3 -s4 icanhazip.com)
if [[ -z "$NODEIP" ]]; then
#if we get here, then most likely icanhazip.com is timing out
echo -e "${RED}Failed to determine IP address. Please wait a couple minutes and rerun script. If this continues, ask for assistance in discord.${NC}"
exit 1
fi
# Header for menu screen.
header() {
sed -e "s|\${GREEN}|$GREEN|g" -e "s|\${NC}|$NC|g" update_report.txt | while read -r line; do echo -e "$line"; done
echo
echo -e "${BLUE}
\t\t ██████╗ ███╗ ███╗██╗ ██╗
\t\t ██╔══██╗████╗ ████║╚██╗ ██╔╝
\t\t ██║ ██║██╔████╔██║ ╚████╔╝
\t\t ██║ ██║██║╚██╔╝██║ ╚██╔╝
\t\t ██████╔╝██║ ╚═╝ ██║ ██║
\t\t ╚═════╝ ╚═╝ ╚═╝ ╚═╝
\t\t $SCRIPVERSION${NC}
\t\t DECENOMY Masternode Script
\t\t ******************************"
echo
}
# Title allign for menu screen.
allign() {
local COIN_NAME=$COIN_NAME
local TEXT_1=$2
local TEXT_2=$3
local COIN_NAME_LEN=${#COIN_NAME}
local TEXT_1_LEN=${#TEXT_1}
local TEXT_2_LEN=${#TEXT_2}
local MAX_LEN=58
local ASCII_L_LEN=${#ASCII_L}
local ASCII_R_LEN=${#ASCII_R}
local TOTAL_LEN=$((ASCII_L_LEN + TEXT_1_LEN + COIN_NAME_LEN + TEXT_2_LEN + ASCII_R_LEN))
local PADDING=$(((MAX_LEN - TOTAL_LEN + 1) / 2))
if [ "$PADDING" -lt 0 ]; then
PADDING=0
fi
printf "%s\n" "$ASCII_LINE"
printf "%*s%s%s${GREEN}%s${NC}%s%s%*s\n" $PADDING "" "$ASCII_L" " $TEXT_1" "$COIN_NAME" " $TEXT_2 " "$ASCII_R" $PADDING ""
printf "%s\n" "$ASCII_LINE"
}
# Variable.
var_overview() {
TICKER1=""
COIN_NAME1=""
COIN_CLI1=""
case "$dir" in
*/.azzure) TICKER1="AZR"; COIN_NAME1="azzure"; COIN_CLI1="azzure-cli"; COIN_DAEMON1="azzured" ;;
*/.beacon) TICKER1="BECN"; COIN_NAME1="beacon"; COIN_CLI1="beacon-cli"; COIN_DAEMON1="beacond" ;;
*/.birake) TICKER1="BIR"; COIN_NAME1="birake"; COIN_CLI1="birake-cli"; COIN_DAEMON1="biraked" ;;
*/.cryptoflow) TICKER1="CFL"; COIN_NAME1="cryptoflow"; COIN_CLI1="cryptoflow-cli"; COIN_DAEMON1="cryptoflowd" ;;
*/.cryptosaga) TICKER1="SAGA"; COIN_NAME1="cryptosaga"; COIN_CLI1="cryptosaga-cli"; COIN_DAEMON1="cryptosagad" ;;
*/.dashdiamond) TICKER1="DASHD"; COIN_NAME1="dashdiamond"; COIN_CLI1="dashdiamond-cli"; COIN_DAEMON1="dashdiamondd" ;;
*/.eskacoin) TICKER1="ESK"; COIN_NAME1="eskacoin"; COIN_CLI1="eskacoin-cli"; COIN_DAEMON1="eskacoind" ;;
*/.flits) TICKER1="FLS"; COIN_NAME1="flits"; COIN_CLI1="flits-cli"; COIN_DAEMON1="flitsd" ;;
*/.jackpot) TICKER1="777"; COIN_NAME1="jackpot"; COIN_CLI1="jackpot-cli"; COIN_DAEMON1="jackpotd" ;;
*/.kyanite) TICKER1="KYAN"; COIN_NAME1="kyanite"; COIN_CLI1="kyanite-cli"; COIN_DAEMON1="kyanited" ;;
*/.mobic) TICKER1="MOBIC"; COIN_NAME1="mobic"; COIN_CLI1="mobic-cli"; COIN_DAEMON1="mobicd" ;;
*/.monk) TICKER1="MONK"; COIN_NAME1="monk"; COIN_CLI1="monk-cli"; COIN_DAEMON1="monkd" ;;
*/.oneworld) TICKER1="OWO"; COIN_NAME1="oneworld"; COIN_CLI1="oneworld-cli"; COIN_DAEMON1="oneworldd" ;;
*/.peony) TICKER1="PNY"; COIN_NAME1="peony"; COIN_CLI1="peony-cli"; COIN_DAEMON1="peonyd" ;;
*/.sapphire) TICKER1="SAPP"; COIN_NAME1="sapphire"; COIN_CLI1="sapphire-cli"; COIN_DAEMON1="sapphired" ;;
*/.suvereno) TICKER1="SUV"; COIN_NAME1="suvereno"; COIN_CLI1="suvereno-cli"; COIN_DAEMON1="suverenod" ;;
*/.ultraclear) TICKER1="UCR"; COIN_NAME1="ultraclear"; COIN_CLI1="ultraclear-cli"; COIN_DAEMON1="ultracleard" ;;
esac
}
var_azr() {
TMP_FOLDER=$(mktemp -d)
CONFIG_FILE='azzure.conf'
CONFIGFOLDER='/home/users/azzure/.azzure'
COIN_DAEMON='azzured'
COIN_CLI='azzure-cli'
COIN_PATH='/usr/local/bin/'
COIN_NAME='azzure'
TICKER='AZR'
GITHUB=https://api.github.com/repos/decenomy/$TICKER/releases/latest
EXPLORER=https://explorer.decenomy.net/api/v2/$TICKER/blocks
COIN_TGZ=`curl -s "$GITHUB" | grep -i "browser_download_url" | grep -E "Linux-x64\.zip|Linux\.zip" | cut -d : -f2-3 | tr -d \" | xargs`
COIN_ZIP=$(echo $COIN_TGZ | awk -F'/' '{print $NF}')
COIN_PORT=14725
RPC_PORT=14724
BOOTSTRAP=https://bootstraps.decenomy.net/$TICKER/bootstrap.zip
user_creations
}
var_becn() {
TMP_FOLDER=$(mktemp -d)
CONFIG_FILE='beacon.conf'
CONFIGFOLDER='/home/users/beacon/.beacon'
COIN_DAEMON='beacond'
COIN_CLI='beacon-cli'
COIN_PATH='/usr/local/bin/'
COIN_NAME='beacon'
TICKER='BECN'
GITHUB=https://api.github.com/repos/decenomy/$TICKER/releases/latest
EXPLORER=https://explorer.decenomy.net/api/v2/$TICKER/blocks
COIN_TGZ=`curl -s "$GITHUB" | grep -i "browser_download_url" | grep -E "Linux-x64\.zip|Linux\.zip" | cut -d : -f2-3 | tr -d \" | xargs`
COIN_ZIP=$(echo $COIN_TGZ | awk -F'/' '{print $NF}')
COIN_PORT=36552
RPC_PORT=36553
BOOTSTRAP=https://bootstraps.decenomy.net/$TICKER/bootstrap.zip
user_creations
}
var_bir() {
TMP_FOLDER=$(mktemp -d)
CONFIG_FILE='birake.conf'
CONFIGFOLDER='/home/users/birake/.birake'
COIN_DAEMON='biraked'
COIN_CLI='birake-cli'
COIN_PATH='/usr/local/bin/'
COIN_NAME='birake'
TICKER='BIR'
GITHUB=https://api.github.com/repos/decenomy/$TICKER/releases/latest
EXPLORER=https://explorer.decenomy.net/api/v2/$TICKER/blocks
COIN_TGZ=`curl -s "$GITHUB" | grep -i "browser_download_url" | grep -E "Linux-x64\.zip|Linux\.zip" | cut -d : -f2-3 | tr -d \" | xargs`
COIN_ZIP=$(echo $COIN_TGZ | awk -F'/' '{print $NF}')
COIN_PORT=39697
RPC_PORT=39698
BOOTSTRAP=https://bootstraps.decenomy.net/$TICKER/bootstrap.zip
user_creations
}
var_cfl() {
TMP_FOLDER=$(mktemp -d)
CONFIG_FILE='cryptoflow.conf'
CONFIGFOLDER='/home/users/cryptoflow/.cryptoflow'
COIN_DAEMON='cryptoflowd'
COIN_CLI='cryptoflow-cli'
COIN_PATH='/usr/local/bin/'
COIN_NAME='cryptoflow'
TICKER='CFL'
GITHUB=https://api.github.com/repos/decenomy/$TICKER/releases/latest
EXPLORER=https://explorer.decenomy.net/api/v2/$TICKER/blocks
COIN_TGZ=`curl -s "$GITHUB" | grep -i "browser_download_url" | grep -E "Linux-x64\.zip|Linux\.zip" | cut -d : -f2-3 | tr -d \" | xargs`
COIN_ZIP=$(echo $COIN_TGZ | awk -F'/' '{print $NF}')
COIN_PORT=13333
RPC_PORT=13334
BOOTSTRAP=https://bootstraps.decenomy.net/$TICKER/bootstrap.zip
user_creations
}
var_saga() {
TMP_FOLDER=$(mktemp -d)
CONFIG_FILE='cryptosaga.conf'
CONFIGFOLDER='/home/users/cryptosaga/.cryptosaga'
COIN_DAEMON='cryptosagad'
COIN_CLI='cryptosaga-cli'
COIN_PATH='/usr/local/bin/'
COIN_NAME='cryptosaga'
TICKER='SAGA'
GITHUB=https://api.github.com/repos/decenomy/$TICKER/releases/latest
EXPLORER=https://explorer.decenomy.net/api/v2/$TICKER/blocks
COIN_TGZ=`curl -s "$GITHUB" | grep -i "browser_download_url" | grep -E "Linux-x64\.zip|Linux\.zip" | cut -d : -f2-3 | tr -d \" | xargs`
COIN_ZIP=$(echo $COIN_TGZ | awk -F'/' '{print $NF}')
COIN_NAME='cryptosaga'
COIN_PORT=37552
RPC_PORT=37553
BOOTSTRAP=https://bootstraps.decenomy.net/$TICKER/bootstrap.zip
user_creations
}
var_dashd() {
TMP_FOLDER=$(mktemp -d)
CONFIG_FILE='dashdiamond.conf'
CONFIGFOLDER='/home/users/dashdiamond/.dashdiamond'
COIN_DAEMON='dashdiamondd'
COIN_CLI='dashdiamond-cli'
COIN_PATH='/usr/local/bin/'
COIN_NAME='dashdiamond'
TICKER='DASHD'
GITHUB=https://api.github.com/repos/decenomy/$TICKER/releases/latest
EXPLORER=https://explorer.decenomy.net/api/v2/$TICKER/blocks
COIN_TGZ=`curl -s "$GITHUB" | grep -i "browser_download_url" | grep -E "Linux-x64\.zip|Linux\.zip" | cut -d : -f2-3 | tr -d \" | xargs`
COIN_ZIP=$(echo $COIN_TGZ | awk -F'/' '{print $NF}')
COIN_PORT=12341
RPC_PORT=23452
BOOTSTRAP=https://bootstraps.decenomy.net/$TICKER/bootstrap.zip
user_creations
}
var_esk() {
TMP_FOLDER=$(mktemp -d)
CONFIG_FILE='eskacoin.conf'
CONFIGFOLDER='/home/users/eskacoin/.eskacoin'
COIN_DAEMON='eskacoind'
COIN_CLI='eskacoin-cli'
COIN_PATH='/usr/local/bin/'
COIN_NAME='eskacoin'
TICKER='ESK'
GITHUB=https://api.github.com/repos/decenomy/$TICKER/releases/latest
EXPLORER=https://explorer.decenomy.net/api/v2/$TICKER/blocks
COIN_TGZ=`curl -s "$GITHUB" | grep -i "browser_download_url" | grep -E "Linux-x64\.zip|Linux\.zip" | cut -d : -f2-3 | tr -d \" | xargs`
COIN_ZIP=$(echo $COIN_TGZ | awk -F'/' '{print $NF}')
COIN_PORT=14215
RPC_PORT=14214
BOOTSTRAP=https://bootstraps.decenomy.net/$TICKER/bootstrap.zip
user_creations
}
var_fls() {
TMP_FOLDER=$(mktemp -d)
CONFIG_FILE='flits.conf'
CONFIGFOLDER='/home/users/flits/.flits'
COIN_DAEMON='flitsd'
COIN_CLI='flits-cli'
COIN_PATH='/usr/local/bin/'
COIN_NAME='flits'
TICKER='FLS'
GITHUB=https://api.github.com/repos/decenomy/$TICKER/releases/latest
EXPLORER=https://explorer.decenomy.net/api/v2/$TICKER/blocks
COIN_TGZ=`curl -s "$GITHUB" | grep -i "browser_download_url" | grep -E "Linux-x64\.zip|Linux\.zip" | cut -d : -f2-3 | tr -d \" | xargs`
COIN_ZIP=$(echo $COIN_TGZ | awk -F'/' '{print $NF}')
COIN_PORT=32972
RPC_PORT=32973
BOOTSTRAP=https://bootstraps.decenomy.net/$TICKER/bootstrap.zip
user_creations
}
var_777() {
TMP_FOLDER=$(mktemp -d)
CONFIG_FILE='jackpot.conf'
CONFIGFOLDER='/home/users/jackpot/.jackpot'
COIN_DAEMON='jackpotd'
COIN_CLI='jackpot-cli'
COIN_PATH='/usr/local/bin/'
COIN_NAME='jackpot'
TICKER='777'
GITHUB=https://api.github.com/repos/decenomy/$TICKER/releases/latest
EXPLORER=https://explorer.decenomy.net/api/v2/$TICKER/blocks
COIN_TGZ=`curl -s "$GITHUB" | grep -i "browser_download_url" | grep -E "Linux-x64\.zip|Linux\.zip" | cut -d : -f2-3 | tr -d \" | xargs`
COIN_ZIP=$(echo $COIN_TGZ | awk -F'/' '{print $NF}')
COIN_PORT=17771
RPC_PORT=27772
BOOTSTRAP=https://bootstraps.decenomy.net/$TICKER/bootstrap.zip
user_creations
}
var_kyan() {
TMP_FOLDER=$(mktemp -d)
CONFIG_FILE='kyanite.conf'
CONFIGFOLDER='/home/users/kyanite/.kyanite'
COIN_DAEMON='kyanited'
COIN_CLI='kyanite-cli'
COIN_PATH='/usr/local/bin/'
COIN_NAME='kyanite'
TICKER='KYAN'
GITHUB=https://api.github.com/repos/decenomy/$TICKER/releases/latest
EXPLORER=https://explorer.decenomy.net/api/v2/$TICKER/blocks
COIN_TGZ=`curl -s "$GITHUB" | grep -i "browser_download_url" | grep -E "Linux-x64\.zip|Linux\.zip" | cut -d : -f2-3 | tr -d \" | xargs`
COIN_ZIP=$(echo $COIN_TGZ | awk -F'/' '{print $NF}')
COIN_PORT=7757
RPC_PORT=7758
BOOTSTRAP=https://bootstraps.decenomy.net/$TICKER/bootstrap.zip
user_creations
}
var_mobic() {
TMP_FOLDER=$(mktemp -d)
CONFIG_FILE='mobic.conf'
CONFIGFOLDER='/home/users/mobic/.mobic'
COIN_DAEMON='mobicd'
COIN_CLI='mobic-cli'
COIN_PATH='/usr/local/bin/'
COIN_NAME='mobic'
TICKER='MOBIC'
GITHUB=https://api.github.com/repos/decenomy/$TICKER/releases/latest
EXPLORER=https://explorer.decenomy.net/api/v2/$TICKER/blocks
COIN_TGZ=`curl -s "$GITHUB" | grep -i "browser_download_url" | grep -E "Linux-x64\.zip|Linux\.zip" | cut -d : -f2-3 | tr -d \" | xargs`
COIN_ZIP=$(echo $COIN_TGZ | awk -F'/' '{print $NF}')
COIN_PORT=22487
RPC_PORT=22488
BOOTSTRAP=https://bootstraps.decenomy.net/$TICKER/bootstrap.zip
user_creations
}
var_monk() {
TMP_FOLDER=$(mktemp -d)
CONFIG_FILE='monk.conf'
CONFIGFOLDER='/home/users/monk/.monk'
COIN_DAEMON='monkd'
COIN_CLI='monk-cli'
COIN_PATH='/usr/local/bin/'
COIN_NAME='monk'
TICKER='MONK'
GITHUB=https://api.github.com/repos/decenomy/$TICKER/releases/latest
EXPLORER=https://explorer.decenomy.net/api/v2/$TICKER/blocks
COIN_TGZ=`curl -s "$GITHUB" | grep -i "browser_download_url" | grep -E "Linux-x64\.zip|Linux\.zip" | cut -d : -f2-3 | tr -d \" | xargs`
COIN_ZIP=$(echo $COIN_TGZ | awk -F'/' '{print $NF}')
COIN_PORT=32270
RPC_PORT=32271
BOOTSTRAP=https://bootstraps.decenomy.net/$TICKER/bootstrap.zip
user_creations
}
var_owo() {
TMP_FOLDER=$(mktemp -d)
CONFIG_FILE='oneworld.conf'
CONFIGFOLDER='/home/users/oneworld/.oneworld'
COIN_DAEMON='oneworldd'
COIN_CLI='oneworld-cli'
COIN_PATH='/usr/local/bin/'
COIN_NAME='oneworld'
TICKER='OWO'
GITHUB=https://api.github.com/repos/decenomy/$TICKER/releases/latest
EXPLORER=https://explorer.decenomy.net/api/v2/$TICKER/blocks
COIN_TGZ=`curl -s "$GITHUB" | grep -i "browser_download_url" | grep -E "Linux-x64\.zip|Linux\.zip" | cut -d : -f2-3 | tr -d \" | xargs`
COIN_ZIP=$(echo $COIN_TGZ | awk -F'/' '{print $NF}')
COIN_PORT=32112
RPC_PORT=32113
BOOTSTRAP=https://bootstraps.decenomy.net/$TICKER/bootstrap.zip
user_creations
}
var_pny() {
TMP_FOLDER=$(mktemp -d)
CONFIG_FILE='peony.conf'
CONFIGFOLDER='/home/users/peony/.peony'
COIN_DAEMON='peonyd'
COIN_CLI='peony-cli'
COIN_PATH='/usr/local/bin/'
COIN_NAME='peony'
TICKER='PNY'
GITHUB=https://api.github.com/repos/decenomy/$TICKER/releases/latest
EXPLORER=https://explorer.decenomy.net/api/v2/$TICKER/blocks
COIN_TGZ=`curl -s "$GITHUB" | grep -i "browser_download_url" | grep -E "Linux-x64\.zip|Linux\.zip" | cut -d : -f2-3 | tr -d \" | xargs`
COIN_ZIP=$(echo $COIN_TGZ | awk -F'/' '{print $NF}')
COIN_PORT=36779
RPC_PORT=36780
BOOTSTRAP=https://bootstraps.decenomy.net/$TICKER/bootstrap.zip
user_creations
}
var_sapp() {
TMP_FOLDER=$(mktemp -d)
CONFIG_FILE='sapphire.conf'
CONFIGFOLDER='/home/users/sapphire/.sapphire'
COIN_DAEMON='sapphired'
COIN_CLI='sapphire-cli'
COIN_PATH='/usr/local/bin/'
COIN_NAME='sapphire'
TICKER='SAPP'
GITHUB=https://api.github.com/repos/decenomy/$TICKER/releases/latest
EXPLORER=https://explorer.decenomy.net/api/v2/$TICKER/blocks
COIN_TGZ=`curl -s "$GITHUB" | grep -i "browser_download_url" | grep -E "Linux-x64\.zip|Linux\.zip" | cut -d : -f2-3 | tr -d \" | xargs`
COIN_ZIP=$(echo $COIN_TGZ | awk -F'/' '{print $NF}')
COIN_PORT=45328
RPC_PORT=45329
BOOTSTRAP=https://bootstraps.decenomy.net/$TICKER/bootstrap.zip
user_creations
}
var_suv() {
TMP_FOLDER=$(mktemp -d)
CONFIG_FILE='suvereno.conf'
CONFIGFOLDER='/home/users/suvereno/.suvereno'
COIN_DAEMON='suverenod'
COIN_CLI='suvereno-cli'
COIN_PATH='/usr/local/bin/'
COIN_NAME='suvereno'
TICKER='SUV'
GITHUB=https://api.github.com/repos/decenomy/$TICKER/releases/latest
EXPLORER=https://explorer.decenomy.net/api/v2/$TICKER/blocks
COIN_TGZ=`curl -s "$GITHUB" | grep -i "browser_download_url" | grep -E "Linux-x64\.zip|Linux\.zip" | cut -d : -f2-3 | tr -d \" | xargs`
COIN_ZIP=$(echo $COIN_TGZ | awk -F'/' '{print $NF}')
COIN_PORT=18976
RPC_PORT=18977
BOOTSTRAP=https://bootstraps.decenomy.net/$TICKER/bootstrap.zip
user_creations
}
var_ucr() {
TMP_FOLDER=$(mktemp -d)
CONFIG_FILE='ultraclear.conf'
CONFIGFOLDER='/home/users/ultraclear/.ultraclear'
COIN_DAEMON='ultracleard'
COIN_CLI='ultraclear-cli'
COIN_PATH='/usr/local/bin/'
COIN_NAME='ultraclear'
TICKER='UCR'
GITHUB=https://api.github.com/repos/decenomy/$TICKER/releases/latest
EXPLORER=https://explorer.decenomy.net/api/v2/$TICKER/blocks
COIN_TGZ=`curl -s "$GITHUB" | grep -i "browser_download_url" | grep -E "Linux-x64\.zip|Linux\.zip" | cut -d : -f2-3 | tr -d \" | xargs`
COIN_ZIP=$(echo $COIN_TGZ | awk -F'/' '{print $NF}')
COIN_PORT=32628
RPC_PORT=32627
BOOTSTRAP=https://bootstraps.decenomy.net/$TICKER/bootstrap.zip
user_creations
}
# Menu to select the coin we want to manage / install.
main_menu() {
header
echo -e "\t\t ${YELLOW} Main Menu${NC}\n"
echo -e $ASCII_LINE
echo -e $ASCII_L" "Select the DECENOMY coin you want to manage" "$ASCII_R
echo -e $ASCII_LINE
echo
echo -e " "[1] Azzure - AZR" |-|-| "[2] Beacon - BECN
echo -e " "[3] Birake - BIR" |-|-| "[4] Cryptoflow - CFL
echo -e " "[5] Cryptosaga - SAGA" |-|-| "[6] Dash Diamond - DASHD
echo -e " "[7] Eskacoin - ESK" |-|-| "[8] Flits - FLS
echo -e " "[9] Jackpot - 777" |-|-| "[10] Kyanite - KYAN
echo -e " "[11] Mobility Coin - MOBIC" |-|-| "[12] Monk - MONK
echo -e " "[13] One World - OWO" |-|-| "[14] Peony - PNY
echo -e " "[15] Sapphire - SAPP" |-|-| "[16] Suvereno - SUV
echo -e " "[17] Ultra Clear - UCR" |-|-| "
echo
echo -e $ASCII_LINE
echo -e " "[18] ${YELLOW}Other options${NC}" |-|-| "[19] ${YELLOW}Overview Center${NC}
echo -e $ASCII_LINE
echo -e "\t\t\t [0] Exit"
echo -e $ASCII_LINE
echo
read -p " Enter the number option: " opt
while true; do
case $opt in
1) clear
var_azr
;;
2) clear
var_becn
;;
3) clear
var_bir
;;
4) clear
var_cfl
;;
5) clear
var_saga
;;
6) clear
var_dashd
;;
7) clear
var_esk
;;
8) clear
var_fls
;;
9) clear
var_777
;;
10) clear
var_kyan
;;
11) clear
var_mobic
;;
12) clear
var_monk
;;
13) clear
var_owo
;;
14) clear
var_pny
;;
15) clear
var_sapp
;;
16) clear
var_suv
;;
17) clear
var_ucr
;;
18) clear
other_options
;;
19) clear
overview_center
;;
0) clear
exit
;;
*) clear
echo -e " Please choose one of the options available "
echo
main_menu
;;
esac
read opt
done
}
# Menu for wallets and masternodes options after selection of the coin we want.
coin_selected() {
header_display() {
echo -e "\t\t ${YELLOW} Main Menu"
echo -e "\t\t\t|- Coin selected${NC}\n"
allign "$COIN_NAME" "Coin selected " ""
}
if [ -f "$CONFIGFOLDER/activemasternode.conf" ]; then
header
header_display
echo
echo -e " "[1] Reinstall masternode multinode
echo -e " "[2] Masternode multinode management
echo -e " "[3] Stats wallet and masternode
echo -e " "[4] Wallet management
echo -e " "[5] Others
echo
echo -e $ASCII_LINE
echo -e "\t\t\t [0] Exit"
echo -e $ASCII_LINE
echo
read -p " Enter the number option: " opt
while true; do
case $opt in
1) clear
install_mn_multinode
;;
2) clear
mn_multinode_management
;;
3) clear
stats_wallet_mn
;;
4) clear
wallet_management
;;
5) clear
others
;;
0) clear
main_menu
;;
*) clear
echo -e " Please choose one of the options available "
echo
coin_selected
;;
esac
read opt
done
else
header
header_display
echo
echo -e " "[1] Install masternode multinode
echo -e " "[2] Others
echo
echo -e $ASCII_LINE
echo -e "\t\t\t [0] Exit"
echo -e $ASCII_LINE
echo
read -p " Enter the number option: " opt
while true; do
case $opt in
1) clear
install_mn_multinode
;;
2) clear
others
;;
0) clear
main_menu
;;
*) clear
echo -e " Please choose one of the options available "
echo
coin_selected
;;
esac
read opt
done
fi
}
# Menu to install a masternode multinode.
install_mn_multinode() {
if [ -f "$CONFIGFOLDER/activemasternode.conf" ]; then
header
echo -e "\t\t ${YELLOW} Main Menu${NC}"
echo -e "\t\t\t|- Coin selected"
echo -e "\t\t\t${YELLOW}|- Masternode multinode reinstallation${NC}\n"
allign "$COIN_NAME" "" "masternode multinode reinstallation"
echo
echo -e "\t\t\t ${RED}WARNING${NC}"
echo
echo -e " "This installation is for
echo -e " "one ${GREEN}$COIN_NAME${NC} Masternode Multinode instance.
echo
echo -e " "There is a ${GREEN}$COIN_NAME${NC} Masternode
echo -e " "installed in this machine, this action will
echo -e " "override that , and all related data will be lost.
echo
echo -e " "Do you want to keep with the reinstallation ?
echo
echo
echo -e $ASCII_LINE
echo -e " "[1] ${YELLOW}Yes${NC}" |-|-| "[0] ${YELLOW}No, go back to previous menu${NC}
echo -e $ASCII_LINE
echo
read -p " Enter the number option: " opt
while true; do
case $opt in
1) clear
purge_old_installation
checks
prepare_system
download_node
setup_mn_multinode
coin_selected
;;
0) clear
coin_selected
;;
*) clear
echo -e "Please choose one of the options available "
echo
install_mn_multinode
;;
esac
read opt
done
else
purge_old_installation
checks
prepare_system
download_node
setup_mn_multinode
coin_selected
fi
}
# Menu to manage activemasternode file for multinode on installation.
activemasternode_multi() {
clear
header
allign "$COIN_NAME" "Add " "masternodes to multinode list"
echo
echo
echo -e " ""Do you want to manage the masternodes for multinode purpose ?"
echo
echo -e $ASCII_LINE
echo -e " "[1] ${YELLOW}Yes${NC}" |-|-| "[0] ${YELLOW}No, will do that later${NC}
echo -e $ASCII_LINE
echo
read -p " Enter the number option: " opt
while true; do
case $opt in
1) clear
add_multinode_masternode
;;
0) clear
coin_selected
;;
*) clear
echo -e "Please choose one of the options available "
echo
activemasternode_multi
;;
esac
read opt
done
}
# Menu to masternode multinode management.
mn_multinode_management() {
header
echo -e "\t\t ${YELLOW} Main Menu${NC}"
echo -e "\t\t\t|- Coin selected"
echo -e "\t\t\t${YELLOW}|- Masternode multinode management${NC}\n"
allign "$COIN_NAME" "" "Masternode multinode management"
echo
echo -e " "[1] List of masternodes in multinode List
echo -e " "[2] Add masternode to multinode List
echo -e " "[3] Delete masternode from multinode List
echo -e " "[4] Bulk activemasternode.conf management
echo
echo -e $ASCII_LINE
echo -e "\t\t [0] Go back to previous menu"
echo -e $ASCII_LINE
echo
read -p " Enter the number option: " opt
while true; do
case $opt in
1) clear
list_multinode_masternode
;;
2) clear
add_multinode_masternode
;;
3) clear
delete_multinode_masternode
;;
4) clear
bulk_activemasternode
;;
0) clear
coin_selected
;;
*) clear
echo -e "Please choose one of the options available "
echo
mn_multinode_management
;;
esac
read opt
done
}
# Menu to list masternodes information from the activemasternode file for multinode.
list_multinode_masternode() {
header
echo -e "\t\t ${YELLOW} Main Menu${NC}"
echo -e "\t\t\t|- Coin selected"
echo -e "\t\t\t|- Masternode multinode management"
echo -e "\t\t\t${YELLOW}|- List of Masternodes in Multinode${NC}\n"
allign "$COIN_NAME" "List of " "Masternode in Multinode"
echo
echo -e " This is the content of the file ${YELLOW}activemasternode.conf${NC}"
echo -e " from ${GREEN}$COIN_NAME${NC} masternode multinode"
echo
echo
cat $CONFIGFOLDER/activemasternode.conf
echo
echo -e $ASCII_LINE
echo -e "\t\t [0] Go back to previous menu"
echo -e $ASCII_LINE
echo
read -p " Enter the number option: " -n 1 -r
if [ "$REPLY" == "0" ]; then
read -p "" -n 1 -r
clear
mn_multinode_management
else
clear
list_multinode_masternode
fi
clear
}
# Menu to add masternodes information in the activemasternode file for multinode.
add_multinode_masternode() {
header_display() {
echo -e "\t\t ${YELLOW} Main Menu${NC}"
echo -e "\t\t\t|- Coin selected"
echo -e "\t\t\t|- Masternode multinode management${NC}"
echo -e "\t\t\t${YELLOW}|- Add masternodes to multinode list${NC}\n"
allign "$COIN_NAME" "Add " "masternode to multinode list"
echo
echo -e " "This is the content of the file ${YELLOW}activemasternode.conf${NC}
echo -e " "from ${GREEN}$COIN_NAME${NC} multinode
echo
cat $CONFIGFOLDER/activemasternode.conf
echo
echo -e $ASCII_LINE
echo
echo -e " "To add more you will need to enter the ${YELLOW}alias${NC} you want and also
echo -e " "the ${CYAN}MasternodeKey${NC} for your ${GREEN}$COIN_NAME${NC} masternode
echo
echo -e " "Guideline:
echo -e " "Format: ${YELLOW}alias${NC} ${CYAN}MasternodeKey${NC}
echo
echo -e " "Example: ${YELLOW}mn1${NC} ${CYAN}93HaYBVUCYjEMeeH1Y4sBGLALQZE1Yc1K64xiqgX37tGBDQL8Xg${NC}
echo
echo -e $ASCII_LINE
}
header
header_display
echo
echo -e " ( if you want to exit, press the number 0 )"
echo
echo -e " "Please introduce just the ${YELLOW}alias${NC}
echo
read ALIAS
if [ -z "$ALIAS" ]; then
clear
echo "Alias cannot be empty. Please try again."
add_multinode_masternode
elif [ "$ALIAS" == "0" ]; then
echo "Exiting the function"
clear
mn_multinode_management
else
clear
header
header_display
echo
echo -e " "${YELLOW}Alias created : ${NC}$ALIAS
echo
create_key
echo
echo
echo $ALIAS $COINKEY >> $CONFIGFOLDER/activemasternode.conf
echo
fi
while true; do
clear
header
echo -e "\t\t ${YELLOW} Main Menu${NC}"
echo -e "\t\t\t|- Coin selected"
echo -e "\t\t\t|- Masternode multinode management${NC}"
echo -e "\t\t\t${YELLOW}|- Add masternodes to multinode list${NC}\n"
allign "$COIN_NAME" "Add " "masternode to multinode list"
echo
echo
echo -e " This is the content of the file ${YELLOW}activemasternode.conf${NC}"
echo -e " from ${GREEN}$COIN_NAME${NC} multinode"
echo
cat $CONFIGFOLDER/activemasternode.conf
echo
echo -e $ASCII_LINE
echo
echo -e " For your ${GREEN}$COIN_NAME${NC} multinode masternode"
echo -e " Do you want to register another masternode?"
echo
echo -e $ASCII_LINE
echo -e "\t"[1] ${YELLOW}Yes${NC}" |-|-| "[0] ${YELLOW}No, go back to previous menu${NC}
echo -e $ASCII_LINE
echo
read -p " Enter the number option: " opt
case $opt in
1) clear
add_multinode_masternode
;;
0) clear
mn_multinode_management
;;
*) clear
echo -e "Please choose one of the options available "
echo
continue
;;
esac
read opt
done
}
# Menu to delete masternodes information in the activemasternode file for multinode.
delete_multinode_masternode() {
header
echo -e "\t\t ${YELLOW} Main Menu${NC}"
echo -e "\t\t\t|- Coin selected"
echo -e "\t\t\t|- Masternode multinode management${NC}"
echo -e "\t\t\t${YELLOW}|- Delete masternodes from multinode list${NC}\n"
allign "$COIN_NAME" "Delete Masternodes from " "Multinode List"
echo
echo -e "This is the content of your ${YELLOW}activemasternode.conf${NC} file"
echo -e "from ${GREEN}$COIN_NAME${NC} multinode"
echo
nl $CONFIGFOLDER/activemasternode.conf
echo
echo -e $ASCII_LINE
echo
echo -e Please select the number of the line you want to delete
echo
echo -e "( if you want to exit, please press the number 0 )"
echo
read NUMBER
if ! expr "$NUMBER" : '[0-9]*' > /dev/null; then
clear
echo -e " Please choose one of the options available"
delete_multinode_masternode
elif [ $NUMBER -eq 0 ]; then
echo -e " Exiting the function"
clear
mn_multinode_management
elif [ $NUMBER -gt $(wc -l < $CONFIGFOLDER/activemasternode.conf) ]; then
clear
echo -e " The selected line number is not available"
delete_multinode_masternode
else
echo
clear
fi
while true; do
header
echo -e "\t\t ${YELLOW} Main Menu${NC}"
echo -e "\t\t\t|- Coin selected"
echo -e "\t\t\t|- Masternode multinode management${NC}"
echo -e "\t\t\t${YELLOW}|- Delete masternodes from multinode list${NC}\n"
allign "$COIN_NAME" "Delete Masternodes from " "Multinode List"
echo
echo -e " Do you really want to delete the line number $NUMBER from"
echo -e " ${YELLOW}activemasternode.conf${NC} file ?"
echo
echo -e " "$(cat $CONFIGFOLDER/activemasternode.conf | head -n $NUMBER | tail -n 1)
echo
echo -e $ASCII_LINE
echo -e "\t"[1] ${YELLOW}Yes${NC}" |-|-| "[0] ${YELLOW}No, go back to previous menu${NC}
echo -e $ASCII_LINE
echo
read -p " Enter the number option: " opt
case $opt in
1) clear
sed -i "${NUMBER}d" $CONFIGFOLDER/activemasternode.conf
delete_multinode_masternode
;;
0) clear
delete_multinode_masternode
;;
*) clear
echo -e "Please choose one of the options available "
echo
continue
;;
esac
read opt
done
}
# Menu for bulk management of activemasternode file for multinode.
bulk_activemasternode() {
header
echo -e "\t\t ${YELLOW} Main Menu${NC}"
echo -e "\t\t\t|- Coin selected"
echo -e "\t\t\t|- Masternode multinode management${NC}"
echo -e "\t\t\t${YELLOW}|- Bulk activemasternode.conf management${NC}\n"
allign "$COIN_NAME" "Bulk activemasternode.conf " "Management"
echo
echo
echo -e " "This option allows the masternode list to be
echo -e " "managed in a bulk way rather than one at a time,
echo -e " "like the previous others options.
echo
echo -e " "Going forward it will open an editor.
echo -e
echo -e " "Follow this guidelines to properly fill the information:
echo
echo -e " "Format: ${YELLOW}alias${NC} ${CYAN}MasternodeKey${NC}
echo
echo -e " "Example: ${YELLOW}mn1${NC} ${CYAN}93HaYBVUCYjEMeeH1Y4sBGLALQZE1Yc1K64xiqgX37tGBDQL8Xg${NC}
echo
echo -e " "When everything is done on the editor, please do ${GREEN}CTRL+X${NC}
echo -e " "and after the ${GREEN}Y${NC} key, followed by ${GREEN}Enter${NC}.
echo
echo
echo -e " "Do you want to bulk edit the activemasternode.conf file?
echo
echo
echo -e $ASCII_LINE
echo -e " "[1] ${YELLOW}Yes${NC}" |-|-| "[0] ${YELLOW}No, go back to previous menu${NC}
echo -e $ASCII_LINE
echo
read -p " Enter the number option: " opt
while true; do
case $opt in
1) clear
nano "$CONFIGFOLDER/activemasternode.conf"
mn_multinode_management
;;
0) clear
mn_multinode_management
;;
*) clear
echo -e "Please choose one of the options available "
echo