Differences

This shows you the differences between two versions of the page.

Link to this comparison view

raspberry-pi [2017/11/24 22:29]
dblume [PiHole]
raspberry-pi [2018/10/06 08:51] (current)
dblume [Jessie or earlier: Add piwheels for fast Python pip installations]
Line 67: Line 67:
 When there are problems, check for logs in ''/var/log/syslog'' or ''/var/log/messages''. When there are problems, check for logs in ''/var/log/syslog'' or ''/var/log/messages''.
  
-It turns out that log2ram does screw up nginx's ability to start on power-cycle. Maybe need something like the following...+I think we need to update ''/etc/systemd/system/log2ram.service'' to make log2ram come after nginx, like so... 
 + 
 +<file bash log2ram.service> 
 +[Unit] 
 +Description=Log2Ram 
 +DefaultDependencies=no 
 +Before=basic.target rsyslog.service syslog.target systemd-journald.service sysinit.target shutdown.target apache2.service nginx.service 
 +After=local-fs.target 
 +Conflicts=shutdown.target reboot.target halt.target 
 +RequiresMountsFor=/var/log /var/hdd.log 
 +IgnoreOnIsolate=yes 
 + 
 +[Service] 
 +Type=oneshot 
 +ExecStart= /usr/local/bin/log2ram start 
 +ExecStop= /usr/local/bin/log2ram stop 
 +ExecReload= /usr/local/bin/log2ram write 
 +RemainAfterExit=yes 
 + 
 +[Install] 
 +WantedBy=sysinit.target 
 +</file> 
 + 
 +Otherwise, it turns out that log2ram does screw up nginx's ability to start on power-cycle. Maybe need something like the following...
  
 <file bash todo_after_powercycle.sh> <file bash todo_after_powercycle.sh>
Line 245: Line 268:
 telnet 127.0.0.1 4711 telnet 127.0.0.1 4711
 >stats >stats
 +</code>
 +
 +or
 +
 +<code bash>
 +echo ">stats" | nc 127.0.0.1 4711
 </code> </code>
  
Line 280: Line 309:
 $ pihole restartdns $ pihole restartdns
 </code> </code>
 +
 +==== Example PiHole API ====
 +
 +<code>
 +curl "http://pi.hole/admin/api.php?summary" | python -m json.tool
 +</code>
 +
 +===== Jessie or earlier: Add piwheels for fast Python pip installations =====
 +
 +If you're not installing Stretch or later, here's [[https://www.piwheels.hostedpi.com/|info on piwheels]]. Add the following to ''/etc/pip.conf'':
 +<file bash /etc/pip.conf>
 +[global]
 +extra-index-url=https://www.piwheels.org/simple
 +</file>
 +
 +====== Keywords ======
  
 Keywords: Lets Encrypt, LetsEncrypt, Hole Keywords: Lets Encrypt, LetsEncrypt, Hole
raspberry-pi.1511591343.txt.gz · Last modified: 2017/11/24 22:29 by dblume
 
Recent changes RSS feed Driven by DokuWiki