mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-27 01:30:18 +00:00
Merge branch 'development' into new/gravitydb
This commit is contained in:
commit
0e14d11a20
7 changed files with 114 additions and 53 deletions
|
@ -22,9 +22,6 @@ addn-hosts=/etc/pihole/gravity.list
|
|||
addn-hosts=/etc/pihole/black.list
|
||||
addn-hosts=/etc/pihole/local.list
|
||||
|
||||
user=pihole
|
||||
group=pihole
|
||||
|
||||
domain-needed
|
||||
|
||||
localise-queries
|
||||
|
|
|
@ -167,7 +167,7 @@ checkout() {
|
|||
echo " ${TICK} Branch ${2} exists"
|
||||
echo "${2}" > /etc/pihole/ftlbranch
|
||||
FTLinstall "${binary}"
|
||||
start_service pihole-FTL
|
||||
restart_service pihole-FTL
|
||||
enable_service pihole-FTL
|
||||
else
|
||||
echo " ${CROSS} Requested branch \"${2}\" is not available"
|
||||
|
|
|
@ -76,7 +76,7 @@ WEB_SERVER_CONFIG_DIRECTORY="/etc/lighttpd"
|
|||
HTML_DIRECTORY="/var/www/html"
|
||||
WEB_GIT_DIRECTORY="${HTML_DIRECTORY}/admin"
|
||||
#BLOCK_PAGE_DIRECTORY="${HTML_DIRECTORY}/pihole"
|
||||
SHM_DIRECTORY="/var/run/shm"
|
||||
SHM_DIRECTORY="/dev/shm"
|
||||
|
||||
# Files required by Pi-hole
|
||||
# https://discourse.pi-hole.net/t/what-files-does-pi-hole-use/1684
|
||||
|
@ -269,6 +269,9 @@ compare_local_version_to_git_version() {
|
|||
# The commit they are on
|
||||
local remote_commit
|
||||
remote_commit=$(git describe --long --dirty --tags --always)
|
||||
# Status of the repo
|
||||
local local_status
|
||||
local_status=$(git status -s)
|
||||
# echo this information out to the user in a nice format
|
||||
# If the current version matches what pihole -v produces, the user is up-to-date
|
||||
if [[ "${remote_version}" == "$(pihole -v | awk '/${search_term}/ {print $6}' | cut -d ')' -f1)" ]]; then
|
||||
|
@ -291,6 +294,16 @@ compare_local_version_to_git_version() {
|
|||
fi
|
||||
# echo the current commit
|
||||
log_write "${INFO} Commit: ${remote_commit}"
|
||||
# if `local_status` is non-null, then the repo is not clean, display details here
|
||||
if [[ ${local_status} ]]; then
|
||||
#Replace new lines in the status with 12 spaces to make the output cleaner
|
||||
log_write "${INFO} Status: ${local_status//$'\n'/'\n '}"
|
||||
local local_diff
|
||||
local_diff=$(git diff)
|
||||
if [[ ${local_diff} ]]; then
|
||||
log_write "${INFO} Diff: ${local_diff//$'\n'/'\n '}"
|
||||
fi
|
||||
fi
|
||||
# If git status failed,
|
||||
else
|
||||
# Return an error message
|
||||
|
|
|
@ -33,6 +33,8 @@ start() {
|
|||
mkdir -p /var/run/pihole
|
||||
mkdir -p /var/log/pihole
|
||||
chown pihole:pihole /var/run/pihole /var/log/pihole
|
||||
# Remove possible leftovers from previous pihole-FTL processes
|
||||
rm -f /dev/shm/FTL-* 2> /dev/null
|
||||
rm /var/run/pihole/FTL.sock 2> /dev/null
|
||||
# Ensure that permissions are set so that pihole-FTL can edit all necessary files
|
||||
chown pihole:pihole /run/pihole-FTL.pid /run/pihole-FTL.port
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue