mirror of
https://github.com/pi-hole/FTL.git
synced 2025-12-20 04:18:25 +00:00
@@ -19,6 +19,10 @@
|
|||||||
#include "dnsmasq.h"
|
#include "dnsmasq.h"
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
|
|
||||||
|
/* Pi-hole modification */
|
||||||
|
#include "../version.h"
|
||||||
|
/************************/
|
||||||
|
|
||||||
static volatile int mem_recover = 0;
|
static volatile int mem_recover = 0;
|
||||||
static jmp_buf mem_jmp;
|
static jmp_buf mem_jmp;
|
||||||
static int one_file(char *file, int hard_opt);
|
static int one_file(char *file, int hard_opt);
|
||||||
@@ -4772,6 +4776,9 @@ void read_opts(int argc, char **argv, char *compile_opts)
|
|||||||
add_txt("privacylevel.pihole", NULL, TXT_PRIVACYLEVEL);
|
add_txt("privacylevel.pihole", NULL, TXT_PRIVACYLEVEL);
|
||||||
/************************/
|
/************************/
|
||||||
#endif
|
#endif
|
||||||
|
/******** Pi-hole modification ********/
|
||||||
|
add_txt("version.FTL", GIT_VERSION, 0 );
|
||||||
|
/**************************************/
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
|||||||
13
test/run.sh
13
test/run.sh
@@ -6,13 +6,16 @@ if [[ "${1}" != "pihole-FTL-linux-x86_64" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Install necessary additional components for testing
|
# Install necessary additional components for testing
|
||||||
apt install dns-utils
|
apt install dnsutils -y
|
||||||
|
|
||||||
# Create necessary directories
|
# Create necessary directories
|
||||||
mkdir -p /etc/pihole /var/run/pihole /var/log
|
mkdir -p /etc/pihole /var/run/pihole /var/log
|
||||||
|
|
||||||
|
# We cannot bind to port
|
||||||
|
echo "port=50" > /etc/dnsmasq.conf
|
||||||
|
|
||||||
# Start FTL
|
# Start FTL
|
||||||
./pihole-FTL
|
project/pihole-FTL-linux-x86_64
|
||||||
|
|
||||||
# Prepare BATS
|
# Prepare BATS
|
||||||
mkdir -p test/libs
|
mkdir -p test/libs
|
||||||
@@ -23,6 +26,12 @@ git submodule add https://github.com/ztombol/bats-support test/libs/bats-support
|
|||||||
# Block until FTL is ready, retry once per second for 45 seconds
|
# Block until FTL is ready, retry once per second for 45 seconds
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
|
# Print versions of pihole-FTL
|
||||||
|
echo "FTL version:"
|
||||||
|
dig TXT CHAOS version.FTL @127.0.0.1 +short
|
||||||
|
echo "Contained dnsmasq version:"
|
||||||
|
dig TXT CHAOS version.bind @127.0.0.1 +short
|
||||||
|
|
||||||
# Print content of pihole-FTL.log
|
# Print content of pihole-FTL.log
|
||||||
cat /var/log/pihole-FTL.log
|
cat /var/log/pihole-FTL.log
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user