mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-22 23:30:13 +00:00
Use heredocs instead of multiple calls to echo
There were a lot of places (like in help functions) that used multiple echo calls instead of heredocs. Personal opinion but this seems cleaner.
This commit is contained in:
parent
28eeaf201b
commit
0efda04920
6 changed files with 68 additions and 57 deletions
|
@ -122,15 +122,16 @@ normalChrono() {
|
|||
}
|
||||
|
||||
displayHelp() {
|
||||
echo "::: Displays stats about your piHole!"
|
||||
echo ":::"
|
||||
echo "::: Usage: sudo pihole -c [optional:-j]"
|
||||
echo "::: Note: If no option is passed, then stats are displayed on screen, updated every 5 seconds"
|
||||
echo ":::"
|
||||
echo "::: Options:"
|
||||
echo "::: -j, --json output stats as JSON formatted string"
|
||||
echo "::: -h, --help display this help text"
|
||||
|
||||
cat << EOM
|
||||
::: Displays stats about your piHole!
|
||||
:::
|
||||
::: Usage: sudo pihole -c [optional:-j]
|
||||
::: Note: If no option is passed, then stats are displayed on screen, updated every 5 seconds
|
||||
:::
|
||||
::: Options:
|
||||
::: -j, --json output stats as JSON formatted string
|
||||
::: -h, --help display this help text
|
||||
EOM
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue