From dd3528ba297f411c5f0e714e780ee4249e947ec5 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Fri, 4 Jun 2021 21:43:54 -0500 Subject: [PATCH 1/6] Update pihole-sync --- pihole-sync | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pihole-sync b/pihole-sync index 872c5ce..2639c23 100755 --- a/pihole-sync +++ b/pihole-sync @@ -71,7 +71,6 @@ push_initialize () { # Copy local Custom and CNAME lists to local Git repo cp $custom_list $personal_git_dir cp $dnsmasq_dir/$cname_list $personal_git_dir - cp $dnsmasq_dir/$localdomains_list $personal_git_dir # Go to local Git repo directory cd $personal_git_dir || exit @@ -101,7 +100,9 @@ pull_initialize () { # Overwrite local files cp $custom_list $pihole_dir cp $cname_list $dnsmasq_dir - cp $localdomains_list $dnsmasq_dir + if [ ! -d "/opt/docker-pi-hole/etc-pihole" ]; then + cp $localdomains_list $dnsmasq_dir + fi # Overwrite local database tables sqlite3 $gravity_db "DROP TABLE adlist;" @@ -166,7 +167,9 @@ pull () { $SUDO service pihole-FTL stop cp $custom_list $pihole_dir cp $cname_list $dnsmasq_dir - cp $localdomains_list $dnsmasq_dir + if [ ! -d "/opt/docker-pi-hole/etc-pihole" ]; then + cp $localdomains_list $dnsmasq_dir + fi sqlite3 $gravity_db "DROP TABLE adlist;" sqlite3 $gravity_db -header -csv ".import adlist.csv adlist" sqlite3 $gravity_db "DROP TABLE domainlist;" From d3cc98393280513ef21feb6e2362eb1d60db5c8b Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Fri, 4 Jun 2021 22:02:10 -0500 Subject: [PATCH 2/6] Update pihole-sync --- pihole-sync | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pihole-sync b/pihole-sync index 2639c23..95e04dc 100755 --- a/pihole-sync +++ b/pihole-sync @@ -32,7 +32,12 @@ update='December 26, 2020' # Project Home: https://github.com/stevejenkins/pihole-cloudsync ########################################################################### # CONSTANTS -personal_git_dir='/usr/local/bin/my-pihole-sync' +if [ -d "/opt/docker-pi-hole/etc-pihole" ]; then + personal_git_dir='/opt/my-pihole-sync' +else + personal_git_dir='/usr/local/bin/my-pihole-sync' +fi + # if [ -d "/opt/docker-pi-hole/etc-pihole" ]; then # pihole_dir='/opt/docker-pi-hole/etc-pihole' From f5fbe9756b81fc8d2d3ae364bf78953d8bc24c01 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Fri, 4 Jun 2021 22:04:48 -0500 Subject: [PATCH 3/6] Update pihole-sync --- pihole-sync | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pihole-sync b/pihole-sync index 95e04dc..d87db55 100755 --- a/pihole-sync +++ b/pihole-sync @@ -32,7 +32,7 @@ update='December 26, 2020' # Project Home: https://github.com/stevejenkins/pihole-cloudsync ########################################################################### # CONSTANTS -if [ -d "/opt/docker-pi-hole/etc-pihole" ]; then +if [ -f "/opt/pihole-docker" ]; then personal_git_dir='/opt/my-pihole-sync' else personal_git_dir='/usr/local/bin/my-pihole-sync' @@ -105,7 +105,7 @@ pull_initialize () { # Overwrite local files cp $custom_list $pihole_dir cp $cname_list $dnsmasq_dir - if [ ! -d "/opt/docker-pi-hole/etc-pihole" ]; then + if [ ! -f "/opt/pihole-docker" ]; then cp $localdomains_list $dnsmasq_dir fi @@ -172,7 +172,7 @@ pull () { $SUDO service pihole-FTL stop cp $custom_list $pihole_dir cp $cname_list $dnsmasq_dir - if [ ! -d "/opt/docker-pi-hole/etc-pihole" ]; then + if [ ! -f "/opt/pihole-docker" ]; then cp $localdomains_list $dnsmasq_dir fi sqlite3 $gravity_db "DROP TABLE adlist;" From c43c225a8a07484dc64585edf3a94f11ac8fbb20 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Fri, 4 Jun 2021 22:05:54 -0500 Subject: [PATCH 4/6] Update pihole-sync --- pihole-sync | 1 + 1 file changed, 1 insertion(+) diff --git a/pihole-sync b/pihole-sync index d87db55..9095f96 100755 --- a/pihole-sync +++ b/pihole-sync @@ -187,6 +187,7 @@ pull () { exit 0 fi } + ########################################################################### # Check to see whether a command line option was provided if [ -z "$1" ] From 5b2d2e5ea108d26c6ee657e12d274fee3a72cfcf Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 3 Oct 2021 09:37:15 -0500 Subject: [PATCH 5/6] Create .gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..43322df --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ + +.DS_Store +.DS_Store From a7cc51b77e44316b8d210d655c32e640349efefd Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Sun, 3 Oct 2021 10:05:51 -0500 Subject: [PATCH 6/6] ignore --- .DS_Store | Bin 6148 -> 6148 bytes .gitignore | 1 + 2 files changed, 1 insertion(+) diff --git a/.DS_Store b/.DS_Store index 5008ddfcf53c02e82d7eee2e57c38e5672ef89f6..80dc2dfa22d4e3bb355bbcef7b7d202d8416e03f 100644 GIT binary patch delta 209 zcmZoMXfc=|&e%RNQEZ}~q96+c0|O%ig8)NLx?yl~es00UMD2QzAPa*YLpnnyLkUa* zC