-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.cc.wallet.profile.sh
More file actions
514 lines (427 loc) · 17.7 KB
/
setup.cc.wallet.profile.sh
File metadata and controls
514 lines (427 loc) · 17.7 KB
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
#!/bin/bash
# include tools
source "./src/tools.sh" || exit 1
# default arguments
cc_script_cfg_path_default="./src/cfg.cc.blocknet.sh"
cc_firejail_default="firejail"
cc_proxychains_default="proxychains4 -q"
# include specific tools
source "./src/tools.cc.wallet.profile.sh" || exit 1
# showhelp is auto set by tools
tool_firejail_show_help
# handle arguments
cc_script_cfg_path=
cc_install_dir_path=
cc_chain_dir_path=
cc_proxychains=${cc_proxychains_default}
cc_wallet_name=
cc_firejail_profile_name_suffix=
cc_action_cc_config=
# process command line arguments
argc=$#
argv=("$@")
tool_firejail_process_arguments ${argc} ${argv}
# start measuring time
tool_time_start
# include main cc cfg script IE: ./src/cfg.cc.blocknet.sh
tool_variable_check_load_default cc_script_cfg_path cc_script_cfg_path_default
tool_realpath cc_script_cfg_path "parameter #1 cc cfg script path"
tool_check_version_and_include_script ${cc_script_cfg_path} "loading cc cfg script"
# check included cfg variables
tool_variable_check_load_default cc_bin_file_name_prefix "" "cc cfg"
tool_variable_check_load_default cc_gui_cfg_dir_name "" "cc cfg"
tool_variable_check_load_default cc_install_dir_path_default "" "wallet default install dir path"
# prepare install directory path
cc_install_dir_path_default_tmp=${cc_dexsetup_dir_path}"/../"${cc_install_dir_path_default}
tool_variable_check_load_default cc_install_dir_path cc_install_dir_path_default_tmp
tool_realpath cc_install_dir_path "cc install dir path"
tool_make_and_check_dir_path cc_install_dir_path "cc install directory"
# cc install directory git
cc_git_src_path=${cc_install_dir_path}"/git.src"
tool_make_and_check_dir_path cc_git_src_path "cc install directory git.src"
# cc install directory bin files path
cc_bin_path=${cc_install_dir_path}"/bin"
tool_make_and_check_dir_path cc_bin_path "cc bin files directory"
# cc chain directory path
tool_variable_check_load_default cc_chain_dir_path cc_chain_dir_path_default "cc chain dir path"
tool_realpath cc_chain_dir_path "cc chain dir path"
tool_make_and_check_dir_path cc_chain_dir_path "cc chain dir path"
# cc chain conf file
tool_variable_check_load_default cc_conf_name_default "" "cc_conf_name_default"
cc_main_cfg_path=${cc_chain_dir_path}"/"${cc_conf_name_default}
tool_variable_check_load_default cc_main_cfg_path "" "cc conf file path"
# wallet dat file name
tool_variable_check_load_default cc_wallet_name cc_wallet_name_default "wallet dat naming"
# wallet backup directory
cc_backup_dir_path=${cc_dexsetup_dir_path}"/backup/"${cc_bin_file_name_prefix}"/"${cc_wallet_name}
# update cc chain conf file
tool_variable_check_load_default cc_main_cfg_add "" "cc conf to add"
tool_update_cc_cfg ${cc_main_cfg_path} "${cc_main_cfg_add}" ${cc_ticker} ${cc_action_cc_config}
# if firejail suffix name is not specified use .cc_wallet_name instead
cc_firejail_profile_name_suffix_tmp="."${cc_wallet_name}
tool_variable_check_load_default cc_firejail_profile_name_suffix cc_firejail_profile_name_suffix_tmp "firejail suffix naming"
# firejail profile file name suffix if custom not exist default will be loaded
cc_firejail_profile_middlename=${cc_bin_file_name_prefix}${cc_firejail_profile_name_suffix}
tool_variable_check_load_default cc_firejail_profile_middlename cc_firejail_profile_middlename "firejail profile name"
# cli command directory for this prefix
cc_cli_dir_name="cli"${cc_firejail_profile_name_suffix}
# change directory where firejail profile templates are
cc_firejail_template_profiles_dir="src"
tool_cd ${cc_firejail_template_profiles_dir} "helper files data dir"
# prepare firejail profile and START scripts for firejail sandboxed make script
cc_custombuild_firejail_profile_file_name_src="setup.cc.make.firejail.profile"
cc_custombuild_firejail_profile_file_name_dst="firejail.${cc_bin_file_name_prefix}.dev.env.profile"
echo "INFO >> copy firejail make profile >> ${cc_custombuild_firejail_profile_file_name_dst}"
cp ${cc_custombuild_firejail_profile_file_name_src} ${cc_install_dir_path}"/"${cc_custombuild_firejail_profile_file_name_dst}
(test $? != 0) && echo "ERROR >> copy file >> ${cc_custombuild_firejail_profile_file_name_dst} >> failed" && exit 1
cc_custombuild_script_path=${cc_install_dir_path}"/firejail.${cc_bin_file_name_prefix}.dev.env.sh"
echo "INFO >> create script >> ${cc_custombuild_script_path} >> to start custom build firejail sandbox"
echo "
cd ${cc_git_src_path}
(test $? != 0) && echo \"ERROR >> cd ${cc_git_src_path} >> failed\" && exit 1
firejail --profile=./../${cc_custombuild_firejail_profile_file_name_dst} --whitelist=\`pwd\` bash
(test $? != 0) && echo \"ERROR >> firejail failed\" && exit 1
" > ${cc_custombuild_script_path} && chmod 755 ${cc_custombuild_script_path}
(test $? != 0) && echo "ERROR >> create script >> ${cc_custombuild_script_path} >> failed" && exit 1
# copy and rename firejail templates to cc install directories
firejail_list=`ls | grep firejail.cc_template.`
for f in $firejail_list; do
new_name=`echo ${f} | sed -e "s+\\\.cc_template\\\.+\\\.${cc_firejail_profile_middlename}\\\.+g"`
cp ${f} ${cc_install_dir_path}"/"${new_name}
(test $? != 0) && echo "ERROR >> file >> ${f} >> copy failed" && exit 1
done
echo "INFO >> copy firejail templates"
# update firejail files by cc
tool_cd ${cc_install_dir_path} "cc_install_dir_path"
tool_eval_arg cc_firejail_profile_add
cc_firejail_profile_add=`echo "$cc_firejail_profile_add" | sed -E ':a;N;$!ba;s/\r{0,1}\n/\\\n/g'`
tool_variable_info cc_firejail_profile_add ""
#~ cc_firejail_profile_add=`echo "$cc_firejail_profile_add" | sed -z 's/\n/\\\n/g'`
#~ echo "2: $cc_firejail_profile_add"
#~ cc_firejail_profile_add=`echo "${cc_firejail_profile_add}" | sed -e "s+\n+\\\n+g"`
#~ echo "2: $cc_firejail_profile_add"
firejail_list=`ls | grep firejail\\\.${cc_firejail_profile_middlename}\\\.`
for f in $firejail_list; do
echo "updating "${f}
sed -i \
-e "s+{cc_install_dir_path}+${cc_install_dir_path}+g" \
-e "s+{cc_chain_dir_path}+${cc_chain_dir_path}+g" \
-e "s+{cc_conf_name_default}+${cc_conf_name_default}+g" \
-e "s+{cc_bin_file_name_prefix}+${cc_bin_file_name_prefix}+g" \
-e "s+{cc_firejail_profile_middlename}+${cc_firejail_profile_middlename}+g" \
-e "s+{cc_cli_dir_name}+${cc_cli_dir_name}+g" \
-e "s+{cc_gui_cfg_dir_name}+${cc_gui_cfg_dir_name}+g" \
-e "s+{cc_wallet_name}+${cc_wallet_name}+g" \
-e "s+{cc_proxychains}+${cc_proxychains}+g" \
-e "s+{cc_firejail_profile_add}+${cc_firejail_profile_add}+g" \
-e "s+{cc_backup_dir_path}+${cc_backup_dir_path}+g" \
${f}
done
echo "INFO >> update firejail profiles"
# update firejail run scripts permissions
firejail_list=`ls | grep firejail\\\.${cc_firejail_profile_middlename}\\\..*sh`
firejail_scripts=""
for f in $firejail_list; do
firejail_scripts="${firejail_scripts}
${f}"
chmod 755 ${f}
(test $? != 0) && echo "ERROR >> file >> ${f} >> chmod 755 failed" && exit 1
done
# make cli command directory and generate all supported commands
function tool_firejail_mk_cli_script() { #var name filename #var name cmd
(test "${1}" != "" ) && local filename=`eval echo "\\${${1}}"`
(test "${2}" != "" ) && local cmd=`eval echo \"\\${${2}}\"`
(test "${filename}" = "" ) && echo "ERROR >> ${FUNCNAME[*]} >> variable >> ${1} >> value >> ${filename} >> load failed" && exit 1
(test "${cmd}" = "" ) && echo "ERROR >> ${FUNCNAME[*]} >> variable >> ${2} >> value >> ${cmd} >> load failed" && exit 1
echo "${cmd}" > "${filename}" && chmod 755 "${filename}"
(test $? != 0) && echo "ERROR >> ${FUNCNAME[*]} >> ${filename} >> script generate failed" && exit 1
echo "INFO >> ${FUNCNAME[*]} >> script >> ${filename} >> generate success"
}
# make and change to cli dir
tool_make_and_check_dir_path cc_cli_dir_name "cli commands directory"
tool_cd ${cc_cli_dir_name} "cli commands directory"
# gen cli command script
cli_file="cli"
cli_cmd_full="#!/bin/bash
./../bin/${cc_bin_file_name_prefix}.cli.bin -datadir=${cc_chain_dir_path} \$@
"
tool_firejail_mk_cli_script cli_file cli_cmd_full
# gen help command script
cli_file="help"
cli_cmd_full="#!/bin/bash
./../bin/${cc_bin_file_name_prefix}.cli.bin -datadir=${cc_chain_dir_path} help \$@ | less
"
tool_firejail_mk_cli_script cli_file cli_cmd_full
# encrypt wallet
cli_file="encrypt"
cli_id="encrypt"
cli_cmd_full="#!/bin/bash
./../bin/${cc_bin_file_name_prefix}.cli.bin -datadir=${cc_chain_dir_path} encryptwallet \"\$(read -sp 'pwd: ' undo; echo \$undo;undo=)\"
"
if [[ "${cc_cli_not_compatible}" != *" ${cli_id} "* ]] ;then
tool_firejail_mk_cli_script cli_file cli_cmd_full
fi
# generate new address
cli_file="getnewaddress.default"
cli_id="getnewaddress.default"
cli_cmd_full="#!/bin/bash
./cli getnewaddress \"\$(read -p 'label: ' undo; echo \$undo;undo=)\"
"
if [[ "${cc_cli_not_compatible}" != *" ${cli_id} "* ]] ;then
tool_firejail_mk_cli_script cli_file cli_cmd_full
fi
# generate new legacy
cli_file="getnewaddress.legacy"
cli_id="getnewaddress.legacy"
cli_cmd_full="#!/bin/bash
./cli getnewaddress \"\$(read -p 'label: ' undo; echo \$undo;undo=)\" \"legacy\"
"
if [[ "${cc_cli_not_compatible}" != *" ${cli_id} "* ]] ;then
tool_firejail_mk_cli_script cli_file cli_cmd_full
fi
# generate new segwit
cli_file="getnewaddress.segwit"
cli_id="getnewaddress.segwit"
cli_cmd_full="#!/bin/bash
./cli getnewaddress \"\$(read -p 'label: ' undo; echo \$undo;undo=)\" \"p2sh-segwit\"
"
if [[ "${cc_cli_not_compatible}" != *" ${cli_id} "* ]] ;then
tool_firejail_mk_cli_script cli_file cli_cmd_full
fi
# generate new bech32
cli_file="getnewaddress.bech32"
cli_id="getnewaddress.bech32"
cli_cmd_full="#!/bin/bash
./cli getnewaddress \"\$(read -p 'label: ' undo; echo \$undo;undo=)\" \"p2sh-bech32\"
"
if [[ "${cc_cli_not_compatible}" != *" ${cli_id} "* ]] ;then
tool_firejail_mk_cli_script cli_file cli_cmd_full
fi
# backup wallet
cli_file="backup"
cli_id="backup"
cli_cmd_full="#!/bin/bash
wallet_path=${cc_backup_dir_path}/${cc_wallet_name}_\`date +'%Y_%m_%d_%H%M%S'\`.dat
echo \"Creating backup at: \${wallet_path}\"
echo \"Please copy whole backup directory to secured external drive\"
./cli backupwallet \"\${wallet_path}\"
"
if [[ "${cc_cli_not_compatible}" != *" ${cli_id} "* ]] ;then
tool_firejail_mk_cli_script cli_file cli_cmd_full
fi
# gen unlock unlock wallet old style
cli_file="unlock.full"
cli_id="unlock.old"
cli_cmd_full="#!/bin/bash
./../bin/${cc_bin_file_name_prefix}.cli.bin -datadir=${cc_chain_dir_path} walletpassphrase \"\$(read -sp 'pwd: ' undo; echo \$undo;undo=)\" 9999999999
"
if [[ "${cc_cli_not_compatible}" != *" ${cli_id} "* ]] ;then
tool_firejail_mk_cli_script cli_file cli_cmd_full
fi
# gen unlock unlock wallet new style
cli_file="unlock.full"
cli_id="unlock.new"
cli_cmd_full="#!/bin/bash
./../bin/${cc_bin_file_name_prefix}.cli.bin -datadir=${cc_chain_dir_path} -stdinwalletpassphrase walletpassphrase 9999999999
"
if [[ "${cc_cli_not_compatible}" != *" ${cli_id} "* ]] ;then
tool_firejail_mk_cli_script cli_file cli_cmd_full
fi
# gen unlock unlock wallet for staking only
cli_file="unlock.staking.only"
cli_id="unlock.staking.only"
cli_cmd_full="#!/bin/bash
./../bin/${cc_bin_file_name_prefix}.cli.bin -datadir=${cc_chain_dir_path} walletpassphrase \"\$(read -sp 'pwd: ' undo; echo \$undo;undo=)\" 9999999999 true
"
if [[ "${cc_cli_not_compatible}" != *" ${cli_id} "* ]] ;then
tool_firejail_mk_cli_script cli_file cli_cmd_full
fi
# gen lock wallet
cli_file="lock"
cli_id="lock"
cli_cmd_full="#!/bin/bash
./../bin/${cc_bin_file_name_prefix}.cli.bin -datadir=${cc_chain_dir_path} walletlock
"
if [[ "${cc_cli_not_compatible}" != *" ${cli_id} "* ]] ;then
tool_firejail_mk_cli_script cli_file cli_cmd_full
fi
# gen stop wallet
cli_file="stop"
cli_id="stop"
cli_cmd_full="#!/bin/bash
./../bin/${cc_bin_file_name_prefix}.cli.bin -datadir=${cc_chain_dir_path} stop
"
if [[ "${cc_cli_not_compatible}" != *" ${cli_id} "* ]] ;then
tool_firejail_mk_cli_script cli_file cli_cmd_full
fi
# gen basic wallet info
cli_file="getwalletinfo.basic"
cli_id="getwalletinfo.basic"
cli_cmd_full="#!/bin/bash
./../bin/${cc_bin_file_name_prefix}.cli.bin -datadir=${cc_chain_dir_path} getwalletinfo | grep -e balance -e txcount -e unlocked
"
if [[ "${cc_cli_not_compatible}" != *" ${cli_id} "* ]] ;then
tool_firejail_mk_cli_script cli_file cli_cmd_full
fi
# gen getstakingstatus
cli_file="getstakingstatus"
cli_id="getstakingstatus"
cli_cmd_full="#!/bin/bash
./../bin/${cc_bin_file_name_prefix}.cli.bin -datadir=${cc_chain_dir_path} getstakingstatus
"
if [[ "${cc_cli_not_compatible}" != *" ${cli_id} "* ]] ;then
tool_firejail_mk_cli_script cli_file cli_cmd_full
fi
# gen getblockchaininfo
cli_file="getblockchaininfo"
cli_id="getblockchaininfo"
cli_cmd_full="#!/bin/bash
./../bin/${cc_bin_file_name_prefix}.cli.bin -datadir=${cc_chain_dir_path} getblockchaininfo
"
if [[ "${cc_cli_not_compatible}" != *" ${cli_id} "* ]] ;then
tool_firejail_mk_cli_script cli_file cli_cmd_full
fi
# gen getblockchaininfo.basics
cli_file="getblockchaininfo.basics"
cli_id="getblockchaininfo.basics"
cli_cmd_full="#!/bin/bash
./../bin/${cc_bin_file_name_prefix}.cli.bin -datadir=${cc_chain_dir_path} getblockchaininfo | grep -e blocks -e headers -e bestblockhash
"
if [[ "${cc_cli_not_compatible}" != *" ${cli_id} "* ]] ;then
tool_firejail_mk_cli_script cli_file cli_cmd_full
fi
# gen getnettotals
cli_file="getnettotals.basics"
cli_id="getnettotals.basics"
cli_cmd_full="#!/bin/bash
./../bin/${cc_bin_file_name_prefix}.cli.bin -datadir=${cc_chain_dir_path} getnettotals | grep -e totalbytes
"
if [[ "${cc_cli_not_compatible}" != *" ${cli_id} "* ]] ;then
tool_firejail_mk_cli_script cli_file cli_cmd_full
fi
# gen connections count
cli_file="getconnectioncount"
cli_id="getconnectioncount"
cli_cmd_full="#!/bin/bash
./../bin/${cc_bin_file_name_prefix}.cli.bin -datadir=${cc_chain_dir_path} getconnectioncount
"
if [[ "${cc_cli_not_compatible}" != *" ${cli_id} "* ]] ;then
tool_firejail_mk_cli_script cli_file cli_cmd_full
fi
# gen gte peer info
cli_file="getpeerinfo.basic"
cli_id="getpeerinfo.basic"
cli_cmd_full="#!/bin/bash
./../bin/${cc_bin_file_name_prefix}.cli.bin -datadir=${cc_chain_dir_path} getpeerinfo | grep \"\\\"addr\\\"\" | grep \"\.\"
"
if [[ "${cc_cli_not_compatible}" != *" ${cli_id} "* ]] ;then
tool_firejail_mk_cli_script cli_file cli_cmd_full
fi
# gen enable network
cli_file="setnetworkactive.true"
cli_id="setnetworkactive.true"
cli_cmd_full="#!/bin/bash
./../bin/${cc_bin_file_name_prefix}.cli.bin -datadir=${cc_chain_dir_path} setnetworkactive true
"
if [[ "${cc_cli_not_compatible}" != *" ${cli_id} "* ]] ;then
tool_firejail_mk_cli_script cli_file cli_cmd_full
fi
# gen disable network
cli_file="setnetworkactive.false"
cli_id="setnetworkactive.false"
cli_cmd_full="#!/bin/bash
./../bin/${cc_bin_file_name_prefix}.cli.bin -datadir=${cc_chain_dir_path} setnetworkactive false
"
if [[ "${cc_cli_not_compatible}" != *" ${cli_id} "* ]] ;then
tool_firejail_mk_cli_script cli_file cli_cmd_full
fi
# gen list UTXOs
cli_file="listunspent.basic"
cli_id="listunspent.basic"
cli_cmd_full="#!/bin/bash
./../bin/${cc_bin_file_name_prefix}.cli.bin -datadir=${cc_chain_dir_path} listunspent 0 | grep -e address -e label -e amount -e confirmations
"
if [[ "${cc_cli_not_compatible}" != *" ${cli_id} "* ]] ;then
tool_firejail_mk_cli_script cli_file cli_cmd_full
fi
# gen list address and balance
cli_file="listaddressgroupings.basic"
cli_id="listaddressgroupings"
cli_cmd_full="#!/bin/bash
./../bin/${cc_bin_file_name_prefix}.cli.bin -datadir=${cc_chain_dir_path} listaddressgroupings | grep -v -e \"\\[\" -e \"\\]\"
"
if [[ "${cc_cli_not_compatible}" != *" ${cli_id} "* ]] ;then
tool_firejail_mk_cli_script cli_file cli_cmd_full
fi
# gen list address and all time recv
cli_file="listreceivedbyaddress.basic"
cli_id="listreceivedbyaddress"
cli_cmd_full="#!/bin/bash
./../bin/${cc_bin_file_name_prefix}.cli.bin -datadir=${cc_chain_dir_path} listreceivedbyaddress 0 true | grep -e address -e label -e amount
"
if [[ "${cc_cli_not_compatible}" != *" ${cli_id} "* ]] ;then
tool_firejail_mk_cli_script cli_file cli_cmd_full
fi
# cross all wallet specific CLI commands to be added
i=0
while :
do
# load CLI file name and command
cli_file=${cc_cli_add[i]}
((i++))
cli_cmd="${cc_cli_add[i]}"
((i++))
# verify CLI file name and command
if [[ "${cli_file}" == '' ]]; then
break
fi
if [[ "${cli_cmd}" == '' ]]; then
break
fi
# evaluate command
tool_eval_arg cli_cmd
# log information
#~ tool_variable_info cli_file "command name to be added"
#~ tool_variable_info cli_cmd "command content to be added"
# add bash prefix
cli_cmd="#!/bin/bash
${cli_cmd}"
# make command file
tool_firejail_mk_cli_script cli_file cli_cmd
done
# run custom post profile commands from cc_command_list_post_profile
tool_cd ${cc_install_dir_path} "cc_install_dir_path"
# cross all post profile specific commands eval them and run them
i=0
while :
do
# load command description and command data itself
cmd_descr=${cc_command_list_post_profile[i]}
((i++))
cmd_data="${cc_command_list_post_profile[i]}"
((i++))
# verify loaded variables
if [[ "${cmd_descr}" == '' ]]; then
break
fi
if [[ "${cmd_data}" == '' ]]; then
break
fi
# evaluate command
tool_eval_arg cmd_data
# log information
tool_variable_info cmd_descr "command name to be executed"
tool_variable_info cmd_data "command content to be executed"
#~ echo "${cmd_data}"
# run command
eval ${cmd_data}
(test $? != 0) && echo "ERROR >> ${cmd_descr} >> last profile specific command failed" && exit 1
echo "Success"
echo ""
done
# list of generated scripts
echo "Generated firejail sandbox profiles >> ${cc_install_dir_path} >> ${firejail_scripts}"
# exit
echo "*** FIREJAIL CC SETUP SUCCESS ***"
tool_time_finish_print
exit 0