Skip to content

Commit 21f719c

Browse files
committed
feat: always wipe config
1 parent 44da877 commit 21f719c

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,41 @@
11
## Availup
22
To run an Avail light client, simply run the following command:
33
```bash
4-
curl -sL1 avail.sh | sh
4+
curl -sL1 avail.sh | bash
55
```
66
or, with `wget`:
77
```bash
8-
wget --https-only --secure-protocol=TLSv1_2 --quiet -O - avail.sh | sh
8+
wget --https-only --secure-protocol=TLSv1_2 --quiet -O - avail.sh | bash
99
```
1010
You can pass additional flags to the script like:
1111
```bash
12-
curl -sL1 avail.sh | sh -s -- --network goldberg
12+
curl -sL1 avail.sh | bash -s -- --network goldberg
1313
```
1414
Currently available flags are:
15-
* `network`: can be one of the following: [`kate`, `goldberg`, `local`]
15+
* `network`: can be one of the following: [`goldberg`, `local`]
1616
* `config`: path to the configuration file, availup will generate a config if this flag is not specified
17+
* `identity`: path to the identity file, availup will generate a config if this flag is not specified
1718
* `app_id`: application ID to run the light client (defaults to `0`)
1819
* `upgrade`: takes `y` and `yes` as valid arguments, indicating that the `avail-light` binary should be upgraded
1920

2021
You can modify the existing default config by running and rerun `availup` to use the new config:
2122
```bash
2223
# create the config:
23-
touch ~/config.yml
24+
touch ~/.avail/config/config.yml
2425
# edit the config:
25-
nano ~/config.yml
26+
nano ~/.avail/config/config.yml
2627
# and rerunning the script:
27-
curl -sL1 avail.sh | sh -s -- --config ~/config.yml
28+
curl -sL1 avail.sh | bash -s -- --config ~/.avail/config/config.yml
2829
```
2930

3031
Alternatively, you can pass a specific application ID with `availup`:
3132
```bash
3233
rm ~/.avail/goldberg/config.yml
3334
# and rerunning the script with flags:
34-
curl -sL1 avail.sh | sh -s -- --app_id 1
35+
curl -sL1 avail.sh | bash -s -- --app_id 1
3536
```
3637

3738
To upgrade the light client to a latest version, you can simply pass the `--upgrade` flag like:
3839
```bash
39-
curl -sL1 avail.sh | sh -s -- --upgrade y
40+
curl -sL1 avail.sh | bash -s -- --upgrade y
4041
```

availup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ if [ "$NETWORK" = "goldberg" ]; then
7373
echo "📄 Configuration file found at $CONFIG."
7474
else
7575
echo "🤷 No configuration file set. This will be automatically generated at startup."
76-
touch $CONFIG
77-
echo -e $CONFIG_PARAMS >>$CONFIG
7876
fi
77+
touch $CONFIG
78+
echo -e $CONFIG_PARAMS >> $CONFIG
7979
else
8080
CONFIG="$config"
8181
fi

0 commit comments

Comments
 (0)