stale-issue-message:'This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days.'
stale-issue-label:$stale_label
stale-issue-label:'${{ env.stale_label }}'
exempt-issue-labels: 'Internal, Fixed in next release, Bug:Confirmed, Documentation Needed'
exempt-all-issue-assignees:true
operations-per-run:300
close-issue-reason:'not_planned'
remove_stale:# trigger "stale" removal immediately when stale issues are commented on
if:github.event_name == 'issue_comment'
remove_stale:
# trigger "stale" removal immediately when stale issues are commented on
# we need to explicitly check that the trigger does not run on comment on a PR as
# Gets the return code of the previous command (last line)
digReturnCode="${cmdResult##*$'\n'}"
@ -217,8 +222,7 @@ os_check() {
if["$valid_response"=true];then
IFS=" "read -r -a supportedOS < <(echo"${response}"| tr -d '"')
for distro_and_versions in "${supportedOS[@]}"
do
for distro_and_versions in "${supportedOS[@]}";do
distro_part="${distro_and_versions%%=*}"
versions_part="${distro_and_versions##*=}"
@ -226,8 +230,7 @@ os_check() {
if[["${detected_os^^}"=~ ${distro_part^^}]];then
valid_os=true
IFS=","read -r -a supportedVer <<<"${versions_part}"
for version in "${supportedVer[@]}"
do
for version in "${supportedVer[@]}";do
if[["${detected_version}"=~ $version]];then
valid_version=true
break
@ -292,8 +295,7 @@ test_dpkg_lock() {
printf" %b Waiting for package manager to finish (up to 30 seconds)\\n""${INFO}"
# fuser is a program to show which processes use the named files, sockets, or filesystems
# So while the lock is held,
while fuser /var/lib/dpkg/lock >/dev/null 2>&1
do
while fuser /var/lib/dpkg/lock >/dev/null 2>&1;do
# we wait half a second,
sleep 0.5
# increase the iterator,
@ -302,7 +304,7 @@ test_dpkg_lock() {
if[[$i -gt 60]];then
printf" %b %bError: Could not verify package manager finished and released lock. %b\\n""${CROSS}""${COL_LIGHT_RED}""${COL_NC}"
printf" Attempt to install packages manually and retry.\\n"
exit 1;
exit1
fi
done
# and then report success once dpkg is unlocked.
@ -475,13 +477,19 @@ getGitFiles() {
# Show that we're checking it
printf"%b %b %s\\n""${OVER}""${TICK}""${str}"
# Update the repo, returning an error message on failure
update_repo "${directory}"||{printf"\\n %b: Could not update local repository. Contact support.%b\\n""${COL_LIGHT_RED}""${COL_NC}";exit 1;}
update_repo "${directory}"||{
printf"\\n %b: Could not update local repository. Contact support.%b\\n""${COL_LIGHT_RED}""${COL_NC}"
exit1
}
# If it's not a .git repo,
else
# Show an error
printf"%b %b %s\\n""${OVER}""${CROSS}""${str}"
# Attempt to make the repository, showing an error on failure
make_repo "${directory}""${remoteRepo}"||{printf"\\n %bError: Could not update local repository. Contact support.%b\\n""${COL_LIGHT_RED}""${COL_NC}";exit 1;}
make_repo "${directory}""${remoteRepo}"||{
printf"\\n %bError: Could not update local repository. Contact support.%b\\n""${COL_LIGHT_RED}""${COL_NC}"
exit1
}
fi
echo""
# Success via one of the two branches, as the commands would exit if they failed.
@ -699,9 +707,9 @@ valid_ip() {
# Regex matching one IPv4 component, i.e. an integer from 0 to 255.
printf" This check can be skipped by setting the environment variable %bPIHOLE_SELINUX%b to %btrue%b\\n""${COL_LIGHT_RED}""${COL_NC}""${COL_LIGHT_RED}""${COL_NC}"
printf" e.g: export PIHOLE_SELINUX=true\\n"
printf" By setting this variable to true you acknowledge there may be issues with Pi-hole during or after the install\\n"
printf" %b %bSELinux Enforcing detected%b. PIHOLE_SELINUX env variable set - installer will continue\\n""${INFO}""${COL_LIGHT_RED}""${COL_NC}"
fi
@ -1626,7 +1629,6 @@ displayFinalMessage() {
# Store a message in a variable and display it
additional="View the web interface at http://pi.hole/admin:${WEBPORT} or http://${IPV4_ADDRESS%/*}:${WEBPORT}/admin\\n\\nYour Admin Webpage login password is ${pwstring}"
# Final completion message to user
dialog --no-shadow --keep-tite \
--title "Installation Complete!"\
@ -1777,26 +1779,30 @@ clone_or_update_repos() {
if[["${reconfigure}"==true]];then
printf" %b Performing reconfiguration, skipping download of local repos\\n""${INFO}"
# Reset the Core repo
resetRepo ${PI_HOLE_LOCAL_REPO}||\
{printf" %b Unable to reset %s, exiting installer%b\\n""${COL_LIGHT_RED}""${PI_HOLE_LOCAL_REPO}""${COL_NC}";\
exit 1;\
resetRepo ${PI_HOLE_LOCAL_REPO}||
{
printf" %b Unable to reset %s, exiting installer%b\\n""${COL_LIGHT_RED}""${PI_HOLE_LOCAL_REPO}""${COL_NC}"
exit1
}
# Reset the Web repo
resetRepo ${webInterfaceDir}||\
{printf" %b Unable to reset %s, exiting installer%b\\n""${COL_LIGHT_RED}""${webInterfaceDir}""${COL_NC}";\
exit 1;\
resetRepo ${webInterfaceDir}||
{
printf" %b Unable to reset %s, exiting installer%b\\n""${COL_LIGHT_RED}""${webInterfaceDir}""${COL_NC}"
# Move source file to backup directory, create directory if not existing
mkdir -p "${backup_path}"
mv "${src}""${backup_file}" 2>/dev/null ||\
mv "${src}""${backup_file}" 2>/dev/null ||
echo -e "${CROSS} Unable to backup ${src} to ${backup_path}"
# Delete tmpFile
rm "${tmpFile}" >/dev/null 2>&1||\
rm "${tmpFile}" >/dev/null 2>&1||
echo -e "${CROSS} Unable to remove ${tmpFile}"
}
@ -221,7 +220,7 @@ gravity_column_exists() {
database_adlist_number(){
# Only try to set number of domains when this field exists in the gravity database
if ! gravity_column_exists "adlist""number";then
return;
return
fi
output=$({printf".timeout 30000\\nUPDATE adlist SET number = %i, invalid_domains = %i WHERE id = %i;\\n""${2}""${3}""${1}"| pihole-FTL sqlite3 -ni "${gravityTEMPfile}";} 2>&1)
@ -237,7 +236,7 @@ database_adlist_number() {
database_adlist_status(){
# Only try to set the status when this field exists in the gravity database
if ! gravity_column_exists "adlist""status";then
return;
return
fi
output=$({printf".timeout 30000\\nUPDATE adlist SET status = %i WHERE id = %i;\\n""${2}""${1}"| pihole-FTL sqlite3 -ni "${gravityTEMPfile}";} 2>&1)