<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[PI Hole command not working]]></title><description><![CDATA[<p dir="auto">I followed all the <a href="https://www.triggercmd.com/forum/topic/825/enable-or-disable-ads-with-pi-hole-on-a-raspberry-pi">instructions</a> given by Russ. The trigger on and off are going to my pi (i can see it over the console). Parameter off was send, but he pihole_on_off.sh file not working do not send pihole enable (same with on).</p>
]]></description><link>https://www.triggercmd.com/forum/topic/2557/pi-hole-command-not-working</link><generator>RSS for Node</generator><lastBuildDate>Thu, 17 Sep 2026 03:35:25 GMT</lastBuildDate><atom:link href="https://www.triggercmd.com/forum/topic/2557.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 01 Mar 2023 18:30:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to PI Hole command not working on Thu, 02 Mar 2023 22:03:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/ti_gaming_tv" aria-label="Profile: TI_Gaming_TV">@<bdi>TI_Gaming_TV</bdi></a>, awesome.  So it's working now?</p>
]]></description><link>https://www.triggercmd.com/forum/post/6866</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/6866</guid><dc:creator><![CDATA[Russ]]></dc:creator><pubDate>Thu, 02 Mar 2023 22:03:09 GMT</pubDate></item><item><title><![CDATA[Reply to PI Hole command not working on Thu, 02 Mar 2023 16:01:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/russ" aria-label="Profile: Russ">@<bdi>Russ</bdi></a> now i know the problem. it was the !# in line 1. I forgot the !</p>
]]></description><link>https://www.triggercmd.com/forum/post/6864</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/6864</guid><dc:creator><![CDATA[TI_Gaming_TV]]></dc:creator><pubDate>Thu, 02 Mar 2023 16:01:11 GMT</pubDate></item><item><title><![CDATA[Reply to PI Hole command not working on Thu, 02 Mar 2023 15:52:12 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/russ" aria-label="Profile: Russ">@<bdi>Russ</bdi></a></p>
<pre><code>#/bin/bash
case "$1" in
  "on")
    pihole enable
    ;;
  "off")
    pihole disable
    ;;
  *)
    echo "Run this with on or off as the parameter."
    exit 1
    ;;
esac

</code></pre>
]]></description><link>https://www.triggercmd.com/forum/post/6863</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/6863</guid><dc:creator><![CDATA[TI_Gaming_TV]]></dc:creator><pubDate>Thu, 02 Mar 2023 15:52:12 GMT</pubDate></item><item><title><![CDATA[Reply to PI Hole command not working on Thu, 02 Mar 2023 13:17:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/ti_gaming_tv" aria-label="Profile: TI_Gaming_TV">@<bdi>TI_Gaming_TV</bdi></a>, I thought that was it because I got a similar error when I used the script you pasted above, although the error was on a different line.</p>
<pre><code>./pihole_on_off.sh: line 5: syntax error near unexpected token `)'
./pihole_on_off.sh: line 5: `"off")'
</code></pre>
<p dir="auto">Can you copy/paste your actual script text here?</p>
]]></description><link>https://www.triggercmd.com/forum/post/6861</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/6861</guid><dc:creator><![CDATA[Russ]]></dc:creator><pubDate>Thu, 02 Mar 2023 13:17:50 GMT</pubDate></item><item><title><![CDATA[Reply to PI Hole command not working on Thu, 02 Mar 2023 07:29:55 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/russ" aria-label="Profile: Russ">@<bdi>Russ</bdi></a> sry. The ;; weren’t copied because I used the iPhone photo scan. That’s not the problem</p>
]]></description><link>https://www.triggercmd.com/forum/post/6859</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/6859</guid><dc:creator><![CDATA[TI_Gaming_TV]]></dc:creator><pubDate>Thu, 02 Mar 2023 07:29:55 GMT</pubDate></item><item><title><![CDATA[Reply to PI Hole command not working on Wed, 01 Mar 2023 23:49:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/ti_gaming_tv" aria-label="Profile: TI_Gaming_TV">@<bdi>TI_Gaming_TV</bdi></a>, you're missing these lines:</p>
<pre><code>;;
</code></pre>
<p dir="auto">Please try this:</p>
<pre><code>#!/bin/bash
case "$1" in
  "on")
    pihole enable
    ;;
  "off")
    pihole disable
    ;;
  *)
    echo "Run this with on or off as the parameter."
    exit 1
    ;;
esac
</code></pre>
]]></description><link>https://www.triggercmd.com/forum/post/6858</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/6858</guid><dc:creator><![CDATA[Russ]]></dc:creator><pubDate>Wed, 01 Mar 2023 23:49:34 GMT</pubDate></item><item><title><![CDATA[Reply to PI Hole command not working on Wed, 01 Mar 2023 22:35:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/russ" aria-label="Profile: Russ">@<bdi>Russ</bdi></a></p>
<pre><code>
root@DietPi:~# cat / root/. TRIGGERcmdData/pihole_on_off.sh 
#/bin/bash 
case "$1" in
"on")
pihole enable
"off")
pihole disable
*)
echo "Run this with on or off as the parameter."
exit 1
;;
esac 

</code></pre>
]]></description><link>https://www.triggercmd.com/forum/post/6857</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/6857</guid><dc:creator><![CDATA[TI_Gaming_TV]]></dc:creator><pubDate>Wed, 01 Mar 2023 22:35:36 GMT</pubDate></item><item><title><![CDATA[Reply to PI Hole command not working on Wed, 01 Mar 2023 22:06:30 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/ti_gaming_tv" aria-label="Profile: TI_Gaming_TV">@<bdi>TI_Gaming_TV</bdi></a>, can you copy/paste your script here?  You seem to have an error on line 2.</p>
]]></description><link>https://www.triggercmd.com/forum/post/6854</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/6854</guid><dc:creator><![CDATA[Russ]]></dc:creator><pubDate>Wed, 01 Mar 2023 22:06:30 GMT</pubDate></item><item><title><![CDATA[Reply to PI Hole command not working on Wed, 01 Mar 2023 21:51:33 GMT]]></title><description><![CDATA[<p dir="auto">I needed to change file permissions.<br />
Now i get this:</p>
<pre><code>
/root/.TRIGGERcmdData/pihole_on_off.sh: line 2: syntax error near unexpected token '§'in\r'
'root/. TRIGGERcmdData/pihole_on_off.sh: line 2: 'case "$1" in

</code></pre>
]]></description><link>https://www.triggercmd.com/forum/post/6853</link><guid isPermaLink="true">https://www.triggercmd.com/forum/post/6853</guid><dc:creator><![CDATA[TI_Gaming_TV]]></dc:creator><pubDate>Wed, 01 Mar 2023 21:51:33 GMT</pubDate></item></channel></rss>