Skip to content

Commit e96f4c5

Browse files
committed
change bash codefence to console
Signed-off-by: Phill Kelley <[email protected]>
1 parent 79e5e6b commit e96f4c5

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

docs/Containers/Pi-hole.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,15 @@ It is important to realise that `WEBPASSWORD` only has any effect on the very **
6868

6969
If `WEBPASSWORD` is **not** set on first launch, Pi-hole defaults to a randomly-generated password which you can discover after the first launch like this:
7070

71-
```bash
71+
```console
7272
$ docker logs pihole | grep random
7373
```
7474

7575
> Remember, docker logs are ephemeral so you need to run that command before the log disappears!
7676

7777
If you ever need to reset Pi-hole's admin password to a known value, use the following command:
7878

79-
```bash
79+
```console
8080
$ docker exec pihole pihole -a -p mybigsecret
8181
```
8282

@@ -206,7 +206,7 @@ Keep in mind that many Raspberry Pis have both Ethernet and WiFi interfaces. It
206206

207207
You can use the following command to discover the MAC addresses for your Raspberry Pi's Ethernet and WiFi interfaces:
208208

209-
```bash
209+
```console
210210
$ for I in eth0 wlan0 ; do ip link show $I ; done
211211
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
212212
link/ether dc:a6:32:4c:89:f9 brd ff:ff:ff:ff:ff:ff
@@ -227,7 +227,7 @@ The Raspberry Pi itself does **not** have to use the Pi-hole container for its o
227227

228228
Nevertheless, if you configure Pi-hole to be [authoritative for local domain names](#localNames) (eg `raspberrypi.home.arpa`) then you will probably want to configure your Raspberry Pi to use the Pi-hole container in the first instance, and then fall back to an alternative if the container is down. Here is an example of how to do that:
229229

230-
```bash
230+
```console
231231
$ echo "name_servers=127.0.0.1" | sudo tee -a /etc/resolvconf.conf
232232
$ echo "name_servers_append=8.8.8.8" | sudo tee -a /etc/resolvconf.conf
233233
$ echo "resolv_conf_local_only=NO" | sudo tee -a /etc/resolvconf.conf
@@ -250,7 +250,7 @@ In words:
250250

251251
You need slightly different syntax if you want to add multiple fallback servers. For example, suppose your fallback hosts are a local server (eg 192.168.1.2) running BIND9 and 8.8.8.8. The command would be:
252252

253-
```bash
253+
```console
254254
$ echo 'name_servers_append="192.168.1.2 8.8.8.8"' | sudo tee -a /etc/resolvconf.conf
255255
```
256256

@@ -274,7 +274,7 @@ Make these assumptions:
274274

275275
The result of the configuration appears in `/etc/resolv.conf`:
276276

277-
```bash
277+
```console
278278
$ cat /etc/resolv.conf
279279
# Generated by resolvconf
280280
nameserver 127.0.0.1
@@ -294,15 +294,15 @@ Notes:
294294

295295
* If you wish to prevent the Raspberry Pi from including the address(es) of DNS servers learned from DHCP, you can instruct the DHCP client running on the Raspberry Pi to ignore the information coming from the DHCP server:
296296

297-
```bash
297+
```console
298298
$ echo 'nooption domain_name_servers' | sudo tee -a /etc/dhcpcd.conf
299299
$ sudo service dhcpcd reload
300300
$ sudo resolvconf -u
301301
```
302302

303303
* If you have followed the steps in [Adding local domain names](#localNames) to define names for your local hosts, you can inform the Raspberry Pi of that fact like this:
304304

305-
```bash
305+
```console
306306
$ echo 'search_domains=home.arpa' | sudo tee -a /etc/resolvconf.conf
307307
$ sudo resolvconf -u
308308
```
@@ -346,21 +346,21 @@ If you need help, try asking questions on the [IOTstack Discord channel](https:/
346346

347347
Install dig:
348348

349-
```bash
349+
```console
350350
$ apt install dnsutils
351351
```
352352

353353
Test that Pi-hole is correctly configured (should respond 192.168.1.10):
354354

355-
```bash
355+
```console
356356
$ dig raspberrypi.home.arpa @192.168.1.10
357357
```
358358

359359
To test on your desktop if your network configuration is correct, and an ESP
360360
will resolve its DNS queries correctly, restart your desktop machine to ensure
361361
DNS changes are updated and then use:
362362

363-
```bash
363+
```console
364364
$ dig raspberrypi.home.arpa
365365
```
366366

@@ -397,7 +397,7 @@ The recommended approach is:
397397
3. Logout of the Web GUI.
398398
4. Run the following commands:
399399

400-
```bash
400+
```console
401401
$ cd ~/IOTstack
402402
$ docker-compose rm --force --stop -v pihole
403403
$ sudo rm -rf ./volumes/pihole

0 commit comments

Comments
 (0)