forked from nahuhh/basicswap-bash
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbsx-clientauth
More file actions
executable file
·38 lines (35 loc) · 1.23 KB
/
bsx-clientauth
File metadata and controls
executable file
·38 lines (35 loc) · 1.23 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
#!/bin/bash
source $HOME/.local/bin/bsx/shared.sh
is_tails
is_running
activate_venv
echo -e "[1] Enable client auth\n[2] Disable client auth\n"
red "NOTE: this a different password than your Wallet Encryption"
until [[ "$l" =~ ^[12]$ ]]; do
read -p 'Select an option [1|2]: ' l
case $l in
1)
until [[ $pass1 ]] && [[ $pass1 == $pass2 ]]; do
read -sp 'New Client password: ' pass1
read -sp $'\nRe-enter Client password: ' pass2
if [[ $pass1 == $pass2 ]]; then
CLIENT_AUTH=$pass1
basicswap-prepare --datadir=$SWAP_DATADIR --client-auth-password="${CLIENT_AUTH}"
echo -e "\nThe auth is: "
green '"admin:<password>"\n\n'
echo -e "For the AMM, add: "
green '"auth": "admin:<password>"'
else
red "\nThe passwords entered don't match. Try again\n"
fi
done
;;
2)
echo -e "\nDisabling client auth"
basicswap-prepare --datadir=$SWAP_DATADIR --disable-client-auth
;;
*)
red "You must answer 1 or 2"
;;
esac
done