From a703d98250b5f10eb2bca24c3e602d7436c48036 Mon Sep 17 00:00:00 2001 From: Martin Winkler Date: Thu, 22 Dec 2022 11:45:42 +0100 Subject: [PATCH] pihole - new seq for pi-hole installation and more --- seqs/pihole.sh | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100755 seqs/pihole.sh diff --git a/seqs/pihole.sh b/seqs/pihole.sh new file mode 100755 index 0000000..4cf7195 --- /dev/null +++ b/seqs/pihole.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash + +readonly toolName=pi-hole + +step_1_info() { echo "${toolName} statue"; } +step_1_alias() { echo "status"; } +step_1() { + local piholeCmd= + if ! piholeCmd="$(command -v pihole)" ; then + warning "${toolName} not installed" + return 1 + fi + exe "${piholeCmd}" status +} + +step_3_alias() { echo "restart"; } +step_3() { + exe service pihole-FTL restart + exe pihole restartdns +} + +step_10_info() { + echo "Install ${toolName} using the offical installer" + echoinfo "https://install.pi-hole.net" +} +step_10_alias() { echo "install"; } +step_10() { + exep curl -sSL https://install.pi-hole.net \| bash +} + +step_11_info() { echo 'Notes'; } +step_11_alias() { echo 'notes'; } +step_11() { + color green + cat <