Christian König
12342682b4
Separate log flush from log rotate
...
CodeQL / Analyze (pull_request) Waiting to run
Test Supported Distributions / smoke-tests (pull_request) Waiting to run
Test Supported Distributions / distro-test (alpine_3_21) (pull_request) Blocked by required conditions
Test Supported Distributions / distro-test (alpine_3_22) (pull_request) Blocked by required conditions
Test Supported Distributions / distro-test (centos_10) (pull_request) Blocked by required conditions
Test Supported Distributions / distro-test (centos_9) (pull_request) Blocked by required conditions
Test Supported Distributions / distro-test (debian_11) (pull_request) Blocked by required conditions
Test Supported Distributions / distro-test (debian_12) (pull_request) Blocked by required conditions
Test Supported Distributions / distro-test (debian_13) (pull_request) Blocked by required conditions
Test Supported Distributions / distro-test (fedora_40) (pull_request) Blocked by required conditions
Test Supported Distributions / distro-test (fedora_41) (pull_request) Blocked by required conditions
Test Supported Distributions / distro-test (fedora_42) (pull_request) Blocked by required conditions
Test Supported Distributions / distro-test (ubuntu_20) (pull_request) Blocked by required conditions
Test Supported Distributions / distro-test (ubuntu_22) (pull_request) Blocked by required conditions
Test Supported Distributions / distro-test (ubuntu_24) (pull_request) Blocked by required conditions
Signed-off-by: Christian König <github@yubiuser.dev >
2025-10-21 20:47:53 +02:00
Michael Ziminsky (Z)
4bf67a3c79
Alpine: Add some additional dependencies and minor script fixes
...
Signed-off-by: Michael Ziminsky (Z) <mgziminsky@users.noreply.github.com >
2025-08-16 21:47:55 +00:00
Dan Schaper
e1b05028a7
Revert "Use PID1 to determine which command to use when toggeling services"
2025-05-31 09:14:08 -07:00
Christian König
137338e6a8
Use service wrappers in all scripts
...
Signed-off-by: Christian König <github@yubiuser.dev >
2025-05-27 21:23:56 +02:00
Adam Warner
195e65855d
Fix more shellcheck warnings ( #6155 )
2025-04-08 17:27:07 +01:00
Christian König
5002ce8ba7
Source files relative to the repos root
...
Signed-off-by: Christian König <github@yubiuser.dev >
2025-04-07 14:10:01 +02:00
Christian König
ca1bab3c1b
Fix more shellcheck warnings
...
Signed-off-by: Christian König <github@yubiuser.dev >
2025-04-07 10:52:57 +02:00
Adam Warner
6e06a93c31
functionise log rotation and flushing code to avoid dupliation
...
Signed-off-by: Adam Warner <me@adamwarner.co.uk >
2025-04-06 13:57:07 +01:00
Jack'lul
4df5c0bb96
Add webserver log to piholeLogFlush.sh
...
Signed-off-by: Jack'lul <8418678+jacklul@users.noreply.github.com >
2025-03-05 22:25:33 +01:00
DL6ER
5dfcd02c40
Improve pihole -f
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-06-22 10:31:03 +02:00
DL6ER
5cb9f4faaa
Modify pihole -f to use TOML config items
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2024-06-19 22:28:14 +02:00
DL6ER
c90a27c509
Add "-ni" to all sqlite3 invocations
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2023-12-09 23:06:50 +01:00
Christian König
ba3e290915
Fix shellcheck errors
...
Signed-off-by: Christian König <ckoenig@posteo.de >
2023-06-04 21:21:48 +02:00
Christian König
954a0c2a14
Remove read permission for others on senible log files
...
Signed-off-by: Christian König <ckoenig@posteo.de >
2022-06-19 23:09:05 +02:00
Adam Warner
36dd533ef3
use directory /var/log/pihole/ for log storage
...
Signed-off-by: Adam Warner <me@adamwarner.co.uk >
2022-05-15 06:46:23 +02:00
Christian König
f4286a4d12
Fix log flush with new query database schema
...
Signed-off-by: Christian König <ckoenig@posteo.de >
2022-02-12 23:33:19 +01:00
DL6ER
8cbffa179d
Replace remaining sqlite3 calls by calls to our embedded pihole-FTL sqlite3 engine and remove sqlite3 as dependency in the installer.
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2022-01-30 11:18:17 +01:00
Faye Duxovni
aa5c15a728
give pihole its own logrotate state file
...
Signed-off-by: Faye Duxovni <duxovni@duxovni.org >
Co-authored-by: Dan Schaper <dan.schaper@pi-hole.net >
2021-07-09 20:00:10 -04:00
pvogt09
8a92fb24c4
Incorporates changes requested by @Mcat12
...
Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com >
2019-05-01 11:20:26 +02:00
pvogt09
5c575e73c7
Adds world readable attribute to files created by Pi-hole to circumvent #2724
...
Signed-off-by: pvogt09 <50047961+pvogt09@users.noreply.github.com >
2019-04-30 22:41:12 +02:00
DL6ER
ca309d3b28
Restart pihole-FTL after log flushing to force reloading history. Fixes #2339
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-08-14 13:16:17 +02:00
Dan Schaper
a08ea28feb
Space/Tab piholeLogFlush.sh
...
Signed-off-by: Dan Schaper <dan.schaper@pi-hole.net >
2018-07-20 13:07:54 -07:00
Ludovic Rousseau
7edab27e53
Stylistic change to use an explicit if/then/fi
...
Signed-off-by: Ludovic Rousseau <ludovic.rousseau@free.fr >
2018-04-13 12:19:55 +02:00
Ludovic Rousseau
9b3531f634
Fix stylistic issue
...
Expand variable using ${FTLconf}
Signed-off-by: Ludovic Rousseau <ludovic.rousseau@free.fr >
2018-04-13 11:48:34 +02:00
Ludovic Rousseau
d8f85a8981
Avoid a "No such file or directory" error
...
Check the file /etc/pihole/pihole-FTL.conf exists before trying to use
it.
without the patch I get, each day, in my logs:
sed: can't read /etc/pihole/pihole-FTL.conf: No such file or directory
I use a variable FTLconf to not repeat the file name twice.
Signed-off-by: Ludovic Rousseau <ludovic.rousseau@free.fr >
2018-04-13 11:16:58 +02:00
Ludovic Rousseau
3b229489c2
Fix regex to find DBFILE= from configuration file
...
The regex ^\s^.DBFILE\s*=\s* does not work to match "DBFILE="
I don't know what the second '^' is used for.
With the change I now have the results:
DBFILE=/foo/bar
-> /foo/bar
DBFILE=/foo/bar
-> /foo/bar
# DBFILE=/foo/bar
-> /etc/pihole/pihole-FTL.db
xDBFILE=/foo/bar
-> /etc/pihole/pihole-FTL.db
Signed-off-by: Ludovic Rousseau <ludovic.rousseau@free.fr >
2018-04-13 11:16:50 +02:00
DL6ER
b8eaa9a527
Use double quotes to precent globbing and word splitting
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-02-17 13:01:00 +01:00
DL6ER
5d274008db
Use possibly user-defined database location when flushing
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-02-17 12:58:57 +01:00
DL6ER
4c249a1186
Flush most recent 24 hours from FTL's database
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-01-21 13:48:13 +01:00
DL6ER
158ea1d43b
Add sqlite3 dependency
...
Signed-off-by: DL6ER <dl6er@dl6er.de >
2018-01-21 11:54:49 +01:00
Adam Warner
536585b846
Colourise Core Output Text ( #1471 )
...
* Define colours within COL_TABLE
* Do not output colours for non-terminal instances
* Removed ":::"
* Fixed indenting & spacing
* Made output consistent throughout project
* Reworded text to fit on standard 80 char wide Terminal screen
* Made 'sudo raspi-config' warning (insufficient disk space) only show on RPi
* Make "Installation/Update Complete" the final msg
* Remove redundant messages
* Simplify update available message
* Confirm user would like to begin uninstall
* If "git pull" string says "Already up-to-date.", place [i] before it
* Colour Temp/Interface output
* Made `pihole disable 5z` invalid
* Added error fallback if invalid argument (not s/m) is detected
* Quoted "$2" for consistency
* Updated help text
* L185/286: Replaced echo with redirect
* User agents for adblock.mahakala.is/adaway.org unnecessary
* Print newline on confirmation of repository reset
* Add output to admin-related dnsmasq restarts
* Return error message for "pihole -q"
* Imply default checkout behaviour with y/N
* Fix uninstall failing to remove pihole user
* Print checkout 'git remote show origin' STDERR on new line
* Replaced checkout "AdminLTE" wording with "Web Admin"
2017-06-21 21:49:05 +10:00
DL6ER
42eb811910
Add "quiet" mode + update comments in the cron file
2017-05-17 12:54:43 +02:00
DL6ER
c9042ffedd
Print echos only when manual flushing is requested
2017-05-17 12:51:04 +02:00
DL6ER
4e2c6a7b8e
Fix logrotation: manual flushing should be done twice, but automated rotation at midnight should only be done *once*!
2017-05-17 12:44:35 +02:00
Hans Geiblinger
b166410cbf
Solve piholeLogFlush.sh having to be issued 2 x to clear logs ( #1460 )
...
Simplified the command -v syntax, and added a sleep 3 timer to the first execution of the log rotation. The second execution was being issued while the first was still running, thus it would fail and you would have to issue the "Flush Logs" command a second time.
2017-05-12 22:39:55 +02:00
DL6ER
320c06e0a4
Flush twice to move data out-of-sight of FTL
2017-04-17 21:25:15 +02:00
Jacob Salmela
7a1a2dec67
update license to EUPL on core files
2017-02-22 11:55:20 -06:00
DL6ER
6fd7e0311c
Install customized version of logrotate script
2017-01-27 14:16:24 +01:00
DL6ER
3a8a936575
Corrected path
2017-01-12 21:01:52 +01:00
DL6ER
3fd2ffd466
Add logrotate for pihole.log
2017-01-12 20:39:25 +01:00
Adam Warner
8cb2f85a08
Replace truncate command with echo " " >
2016-09-02 16:39:34 +01:00
Promofaux
97d3aedba1
Add some output to the log flush
2016-04-03 18:27:18 +01:00
Mcat12
48f9a61ff0
Updated License
2016-01-30 15:12:40 -05:00
Dan Schaper
cb91b8f5fa
Add copyright headers
2015-12-06 05:55:50 -08:00
Jacob Salmela
1b51b9ade3
for use as a cron job
...
The log will be flushed daily and stats will be stored in a DB for
displaying on the Web interface.
2015-11-05 14:31:38 -06:00