Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
jarelllama authored Mar 28, 2024
1 parent b6ede49 commit 0c20a5b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions parked.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function main {
format_list "$file"
done
add_unparked_domains
#remove_parked_domains
remove_parked_domains
#update_light_file
}

Expand Down Expand Up @@ -48,16 +48,12 @@ function remove_parked_domains {
printf "\nChecking for parked domains.\n"

# Split into 12 equal files
split -d -l $(($(wc -l < "$raw_file")/12)) "$raw_file"
split -d -l $(($(wc -l < "$raw_file")/10)) "$raw_file"
check_for_parked "x00" "main" & check_for_parked "x01" &
check_for_parked "x02" & check_for_parked "x03" &
check_for_parked "x04" & check_for_parked "x05" &
check_for_parked "x06" & check_for_parked "x07" &
check_for_parked "x08" & check_for_parked "x09" &
check_for_parked "x10" & check_for_parked "x11" &
[[ -f x12 ]] && check_for_parked "x12" || printf "" # printf to negate exit status 1

find . -maxdepth 1 -type f -name "x??" -delete # Reset split files
check_for_parked "x08" & check_for_parked "x09"

[[ ! -f parked_domains.tmp ]] && return
format_list parked_domains.tmp
Expand All @@ -67,6 +63,9 @@ function remove_parked_domains {
cat parked_domains.tmp >> "$parked_domains_file" # Add parked domains to parked domains file
format_list "$parked_domains_file"
log_event "$(<parked_domains.tmp)" "parked" "raw"

find . -maxdepth 1 -type f -name "x??" -delete
find . -maxdepth 1 -type f -name "*.tmp" -delete
}

function check_for_unparked {
Expand Down

0 comments on commit 0c20a5b

Please sign in to comment.