mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
function declarations as per basic-install.sh
This commit is contained in:
parent
9352ba6e4a
commit
461de48625
1 changed files with 14 additions and 14 deletions
28
pihole
28
pihole
|
@ -22,30 +22,30 @@ if [[ ! $EUID -eq 0 ]];then
|
|||
fi
|
||||
fi
|
||||
|
||||
function whitelistFunc {
|
||||
whitelistFunc() {
|
||||
shift
|
||||
/opt/pihole/whitelist.sh "$@"
|
||||
exit 0
|
||||
}
|
||||
|
||||
function blacklistFunc {
|
||||
blacklistFunc() {
|
||||
shift
|
||||
/opt/pihole/blacklist.sh "$@"
|
||||
exit 0
|
||||
}
|
||||
|
||||
function debugFunc {
|
||||
debugFunc() {
|
||||
/opt/pihole/piholeDebug.sh
|
||||
exit 0
|
||||
}
|
||||
|
||||
function flushFunc {
|
||||
flushFunc() {
|
||||
/opt/pihole/piholeLogFlush.sh
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
||||
function updatePiholeFunc {
|
||||
updatePiholeFunc() {
|
||||
|
||||
if [ ! -d "/etc/.pihole" ]; then #This is unlikely
|
||||
echo "::: Critical Error: Pi-Hole repo missing from system!"
|
||||
|
@ -113,22 +113,22 @@ function updatePiholeFunc {
|
|||
exit 0
|
||||
}
|
||||
|
||||
function reconfigurePiholeFunc {
|
||||
reconfigurePiholeFunc() {
|
||||
/etc/.pihole/automated\ install/basic-install.sh
|
||||
exit 0;
|
||||
}
|
||||
|
||||
function updateGravityFunc {
|
||||
updateGravityFunc() {
|
||||
/opt/pihole/gravity.sh "$@"
|
||||
exit 0
|
||||
}
|
||||
|
||||
function setupLCDFunction {
|
||||
setupLCDFunction() {
|
||||
/opt/pihole/setupLCD.sh
|
||||
exit 0
|
||||
}
|
||||
|
||||
function queryFunc {
|
||||
queryFunc() {
|
||||
domain=$2
|
||||
for list in /etc/pihole/list.*
|
||||
do
|
||||
|
@ -142,24 +142,24 @@ function queryFunc {
|
|||
exit 0
|
||||
}
|
||||
|
||||
function chronometerFunc {
|
||||
chronometerFunc() {
|
||||
shift
|
||||
/opt/pihole/chronometer.sh "$@"
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
||||
function uninstallFunc {
|
||||
uninstallFunc() {
|
||||
/opt/pihole/uninstall.sh
|
||||
exit 0
|
||||
}
|
||||
|
||||
function versionFunc {
|
||||
versionFunc() {
|
||||
/opt/pihole/version.sh
|
||||
exit 0
|
||||
}
|
||||
|
||||
function helpFunc {
|
||||
helpFunc() {
|
||||
echo "::: Control all PiHole specific functions!"
|
||||
echo ":::"
|
||||
echo "::: Usage: pihole [options]"
|
||||
|
@ -201,4 +201,4 @@ case "$1" in
|
|||
"-q" | "query" ) queryFunc "$@";;
|
||||
"uninstall" ) uninstallFunc;;
|
||||
* ) helpFunc;;
|
||||
esac
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue