Skip to content

Commit 890e434

Browse files
Update installation on ubuntu commands (#2003)
* Update installation on ubuntu commands remove $CODENAME that doesn't work properly Signed-off-by: Mohammed Abdallah <[email protected]> * Update installation on ubuntu - Redirect stderr messages, to not get extra lines of output like No LSB modules are available. - Separate the codename variable to be more efficient and readable Signed-off-by: Mohammed Abdallah <[email protected]> --------- Signed-off-by: Mohammed Abdallah <[email protected]>
1 parent 11be23e commit 890e434

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

installation/linux/ubuntu.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,16 @@ Refer to the [supported platform documentation](../supported-platforms.md) to se
4545

4646
## Update your sources lists
4747

48-
On Ubuntu, you need to add the Fluent Bit APT server entry to your sources lists. Ensure `CODENAME` is set to your specific [Ubuntu release name](https://wiki.ubuntu.com/Releases). For example, `focal` for Ubuntu 20.04.
48+
On Ubuntu, you need to add the Fluent Bit APT server entry to your sources lists.
49+
Ensure `codename` is set to your specific [Ubuntu release name](https://wiki.ubuntu.com/Releases). For example, `focal` for Ubuntu 20.04.
4950

5051
```bash
51-
echo "deb [signed-by=/usr/share/keyrings/fluentbit-keyring.gpg] https://packages.fluentbit.io/ubuntu/${CODENAME} ${CODENAME} main" | sudo tee /etc/apt/sources.list.d/fluent-bit.list
52+
codename=$(grep -oP '(?<=VERSION_CODENAME=).*' /etc/os-release 2>/dev/null || lsb_release -cs 2>/dev/null)
53+
```
54+
Now Update your sources listes
55+
56+
```bash
57+
echo "deb [signed-by=/usr/share/keyrings/fluentbit-keyring.gpg] https://packages.fluentbit.io/ubuntu/$codename $codename main" | sudo tee /etc/apt/sources.list.d/fluent-bit.list
5258
```
5359

5460
### Update your repositories database

0 commit comments

Comments
 (0)