mirror of
https://github.com/vmstan/gravity-sync.git
synced 2025-07-31 14:33:47 -04:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
54ddeb6666 | ||
|
50c786eb9d | ||
|
ccb89624f7 | ||
|
4402ff0d73 | ||
|
ad783f1385 | ||
|
183190e4bb | ||
|
9fc48413fe |
85
ENV.md
Normal file
85
ENV.md
Normal file
@ -0,0 +1,85 @@
|
||||
<p align="center">
|
||||
<img src="images/gs-logo.svg" width="300" alt="Gravity Sync">
|
||||
</p>
|
||||
|
||||
<span align="center">
|
||||
|
||||
# Gravity Sync ENVs
|
||||
|
||||
</span>
|
||||
|
||||
These tables are a list of all Gravity Sync settings, that can be tweaked via ENVs. Keep in mind that some of them are stored in `/etc/gravity-sync/gravity-sync.conf` after running `gravity-sync configure` and that `gravity-sync.conf` has higher priority than ENVs.
|
||||
|
||||
### Local and remote paths & settings
|
||||
These settings will determine, from where (locally) to where (remotely) will be synced and with which account/permissions
|
||||
| Variable | Default | Value | Description |
|
||||
|----------------------------|------------------|------------|----------------------------------------------------|
|
||||
| `LOCAL_PIHOLE_DIRECTORY` | `/etc/pihole` | path | Path to local pi-hole instance in the filesystem |
|
||||
| `REMOTE_PIHOLE_DIRECTORY` | `/etc/pihole` | path | Path to remote pi-hole instance in the filesystem |
|
||||
| `LOCAL_DNSMASQ_DIRECTORY` | `/etc/dnsmasq.d` | path | Path to local dnsmasqd instance in the filesystem |
|
||||
| `REMOTE_DNSMASQ_DIRECTORY` | `/etc/dnsmasq.d` | path | Path to remote dnsmasqd instance in the filesystem |
|
||||
| `LOCAL_FILE_OWNER` | `pihole:pihole` | user:group | Local owner and group of the pi-hole config |
|
||||
| `REMOTE_FILE_OWNER` | `pihole:pihole` | user:group | Remote owner and group of the pi-hole config |
|
||||
|
||||
### Docker specific settings
|
||||
Gravity-sync will check your system for a native Pi-hole install first (on local and remote site) and if does not detect any, tests against Docker/Podman Pi-hole instances.
|
||||
Here, you can specific the Docker or Podman container name, that Gravity Sync should interact with.
|
||||
| Variable | Default | Value | Description |
|
||||
|---------------------------|----------|----------------|--------------------------------------------|
|
||||
| `LOCAL_DOCKER_CONTAINER` | `pihole` | container name | Container name of pi-hole running locally |
|
||||
| `REMOTE_DOCKER_CONTAINER` | `pihole` | container name | Container name of pi-hole running remotely |
|
||||
|
||||
### Paths to standard files and folders
|
||||
These settings are most likely the same on all systems. No need to touch them but nice to be able to touch them, if necessary.
|
||||
| Variable | Default | Value | Description |
|
||||
|----------------------------|-------------------------|-------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `DEFAULT_PIHOLE_DIRECTORY` | `/etc/pihole` | path | Docker/Podman: Path to Pi-hole instance within a Docker/Podman container. Don't mix up with `LOCAL_PIHOLE_DIRECTORY`, which is only used against local Pi-hole instances (non-dockerized). |
|
||||
| `LOCAL_PIHOLE_BINARY` | `/usr/local/bin/pihole` | path | Path to `pihole` binary on local system |
|
||||
| `REMOTE_PIHOLE_BINARY` | `/usr/local/bin/pihole` | path | Path to `pihole` binary on remote system |
|
||||
| `LOCAL_FTL_BINARY` | `/usr/bin/pihole-FTL` | path | Path to `pihole-FTL` binary on local system |
|
||||
| `REMOTE_FTL_BINARY` | `/usr/bin/pihole-FTL` | path | Path to `pihole-FTL` binary on remote system |
|
||||
| `LOCAL_DOCKER_BINARY` | `/usr/bin/docker` | path | Path to `docker` binary on local system |
|
||||
| `REMOTE_DOCKER_BINARY` | `/usr/bin/docker` | path | Path to `docker` binary on remote system |
|
||||
| `LOCAL_PODMAN_BINARY` | `/usr/bin/podman` | path | Path to `podman` binary on local system |
|
||||
| `REMOTE_PODMAN_BINARY` | `/usr/bin/podman` | path | Path to `podman` binary on remote system |
|
||||
| `PIHOLE_CONTAINER_IMAGE` | `pihole/pihole` | path | Name of the default pi-hole docker image |
|
||||
|
||||
### Nitty-gritty finetuning the target files
|
||||
Here, you can specifiy the Gravity, DNS (A, CNAME) and DHCP settings file of Pi-hole. It is almost certain, that these filenames do never change (except if upstream Pi-hole decides so).
|
||||
| Variable | Default | Value | Description |
|
||||
|-----------------|-------------------------------|-------|--------------------------------------------|
|
||||
| `PH_GRAVITY_FI` | `gravity.db` | file | The gravity filename (blocklist) of pihole |
|
||||
| `PH_CUSTOM_DNS` | `custom.list` | file | The custom DNS (A) filename of pihole |
|
||||
| `PH_CNAME_CONF` | `05-pihole-custom-cname.conf` | file | The custom DNS (CNAME) filename of pihole |
|
||||
| `PH_SDHCP_CONF` | `04-pihole-static-dhcp.conf` | file | The custom DHCP filename of pihole |
|
||||
|
||||
### Backup Customization
|
||||
| Variable | Default | Value | Description |
|
||||
|----------------------------|---------|----------------|-----------------------------------------------------------------------------------------------|
|
||||
| `GS_BACKUP_TIMEOUT` | `240` | seconds | How long shall we allow a gravity.db backup task to run, before it is deemed to be timed out? |
|
||||
| `GS_BACKUP_INTEGRITY_WAIT` | `5` | seconds | Some wait time, before integrity checks are performed on gravity.db |
|
||||
| `GS_BACKUP_EXT` | `gsb` | file-extension | Local and remote gravity.db backup files will get this file-extension added before merge. |
|
||||
|
||||
### GS Folder/File Locations
|
||||
| Variable | Default | Value | Description |
|
||||
|-------------------------|-----------------------------------|-------|--------------------------------------------------------------------------------------------|
|
||||
| `GS_ETC_PATH` | `/etc/gravity-sync` | path | Path to the gravity-sync work & config directory |
|
||||
| `GS_CONFIG_FILE` | `gravity-sync.conf` | file | Name of the gravity.sync config file |
|
||||
| `GS_SYNCING_LOG` | `gs-sync.log` | file | Logfile for gravity-sync |
|
||||
| `GS_GRAVITY_FI_MD5_LOG` | `gs-gravity.md5` | file | Filename for storing `PH_GRAVITY_FI` hash (used for sync comparison locally and on remote) |
|
||||
| `GS_CUSTOM_DNS_MD5_LOG` | `gs-clist.md5` | file | Filename for storing `PH_CUSTOM_DNS` hash (used for sync comparison locally and on remote) |
|
||||
| `GS_CNAME_CONF_MD5_LOG` | `05-pihole-custom-cname.conf.md5` | file | Filename for storing `PH_CNAME_CONF` hash (used for sync comparison locally and on remote) |
|
||||
| `GS_SDHCP_CONF_MD5_LOG` | `04-pihole-static-dhcp.conf.md5` | file | Filename for storing `PH_SDHCP_CONF` hash (used for sync comparison locally and on remote) |
|
||||
|
||||
### Remote SSH config
|
||||
Customize parameters for accessing the remote end via SSH
|
||||
| Variable | Default | Value | Description |
|
||||
|---------------|----------------------------------|-------|---------------------------------------------------------------------------------------------------------|
|
||||
| `GS_SSH_PORT` | `22` | port | Port of the remote gravity-sync container/host |
|
||||
| `GS_SSH_PKIF` | `<GS_ETC_PATH>/gravity-sync.rsa` | file | Path to the local SSH private key of gravity-sync, that will be used for pubkey auth against the remote |
|
||||
|
||||
### Upgrade: Gravity Sync sourcecode location
|
||||
Gravity Sync is locally installed as a GitHub repo. In order to upgrade your local Gravity Sync instance via `gravity-sync upgrade` to the latest version, the path to that git repo must be known and can be specified below.
|
||||
| Variable | Default | Value | Description |
|
||||
|-----------------|---------------------|-------|---------------------------------------------|
|
||||
| `GS_LOCAL_REPO` | `<GS_ETC_PATH>/.gs` | path | Local install path of the gravity-sync repo |
|
@ -1,5 +1,5 @@
|
||||
<p align="center">
|
||||
<img src="https://vmstan.com/content/images/2021/02/gs-logo.svg" width="300" alt="Gravity Sync">
|
||||
<img src="images/gs-logo.svg" width="300" alt="Gravity Sync">
|
||||
</p>
|
||||
|
||||
<span align="center">
|
||||
@ -8,7 +8,9 @@
|
||||
|
||||
</span>
|
||||
|
||||
### [Find out what's new in version 4.0!](https://github.com/vmstan/gravity-sync/wiki/4.0)
|
||||
### Effective July 26, 2024, this project has been retired. Thank you for your use and enthusiasm for a project that began as a few lines of bash in a Slack channel and envolved into something far more complex, and used by many thousands of Pi-hole enthusiasts over the last four years.
|
||||
|
||||
### The last released version of Gravity Sync (4.0.7) should continue to work with Pi-hole 5.x, but not with Pi-hole 6+ due to architecture changes.
|
||||
|
||||
What is better than a [Pi-hole](https://github.com/pi-hole/pi-hole) blocking trackers, advertisements, and other malicious domains on your network? That's right, **two** Pi-hole blocking all that junk on your network!
|
||||
|
||||
|
553
gravity-sync
553
gravity-sync
File diff suppressed because it is too large
Load Diff
88
images/gs-logo.svg
Normal file
88
images/gs-logo.svg
Normal file
@ -0,0 +1,88 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="406px" height="180px" viewBox="0 0 406 180" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
|
||||
<!-- Generated by Pixelmator Pro 2.0.5 -->
|
||||
<path id="Rounded-Rectangle-copy-3" d="M96.934 82.929 C93.029 86.834 93.029 93.166 96.934 97.071 L146.431 146.569 C150.337 150.474 156.668 150.474 160.574 146.569 L210.071 97.071 C213.976 93.166 213.976 86.834 210.071 82.929 L160.574 33.431 C156.668 29.526 150.337 29.526 146.431 33.431 Z" fill="#00a2ff" fill-opacity="1" stroke="none"/>
|
||||
<defs>
|
||||
<linearGradient id="linear-gradient" gradientUnits="userSpaceOnUse" x1="1.648" y1="84.65" x2="180.328" y2="88.78">
|
||||
<stop offset="0" stop-color="#0ec9b0" stop-opacity="1"/>
|
||||
<stop offset="1" stop-color="#22a5fb" stop-opacity="1"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path id="Ellipse-copy-3" d="M153.503 26.36 C118.355 -8.787 61.37 -8.787 26.223 26.36 -8.924 61.508 -8.924 118.492 26.223 153.64 61.37 188.787 118.355 188.787 153.503 153.64 188.65 118.492 188.65 61.508 153.503 26.36 Z" fill-opacity="1" fill="url(#linear-gradient)" stroke="none"/>
|
||||
<g id="New-Group-copy-5">
|
||||
<path id="Rounded-Rectangle-copy-1" d="M96.934 82.929 C93.029 86.834 93.029 93.166 96.934 97.071 L146.431 146.569 C150.337 150.474 156.668 150.474 160.574 146.569 L210.071 97.071 C213.976 93.166 213.976 86.834 210.071 82.929 L160.574 33.431 C156.668 29.526 150.337 29.526 146.431 33.431 Z" fill="#00a2ff" fill-opacity="1" stroke="none"/>
|
||||
<defs>
|
||||
<linearGradient id="linear-gradient-1" gradientUnits="userSpaceOnUse" x1="1.648" y1="84.65" x2="180.328" y2="88.78">
|
||||
<stop offset="0" stop-color="#0ec9b0" stop-opacity="1"/>
|
||||
<stop offset="1" stop-color="#22a5fb" stop-opacity="1"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path id="Ellipse-copy" d="M153.503 26.36 C118.355 -8.787 61.37 -8.787 26.223 26.36 -8.924 61.508 -8.924 118.492 26.223 153.64 61.37 188.787 118.355 188.787 153.503 153.64 188.65 118.492 188.65 61.508 153.503 26.36 Z" fill-opacity="1" fill="url(#linear-gradient-1)" stroke="none"/>
|
||||
</g>
|
||||
<path id="Rounded-Rectangle-copy" d="M96.934 82.929 C93.029 86.834 93.029 93.166 96.934 97.071 L132.289 132.426 C136.195 136.332 142.526 136.332 146.431 132.426 L181.787 97.071 C185.692 93.166 185.692 86.834 181.787 82.929 L146.431 47.574 C142.526 43.668 136.195 43.668 132.289 47.574 Z" fill="#ffffff" fill-opacity="1" stroke="none"/>
|
||||
<path id="Ellipse-copy-2" d="M139.36 40.503 C112.024 13.166 67.702 13.166 40.365 40.503 13.029 67.839 13.029 112.161 40.365 139.497 67.702 166.834 112.024 166.834 139.36 139.497 166.697 112.161 166.697 67.839 139.36 40.503 Z" fill="#ffffff" fill-opacity="1" stroke="none"/>
|
||||
<g id="New-Group-copy-4">
|
||||
<path id="Path" d="M96.934 82.929 C93.029 86.834 93.029 93.166 96.934 97.071 L132.289 132.426 C136.195 136.332 142.526 136.332 146.431 132.426 L181.787 97.071 C185.692 93.166 185.692 86.834 181.787 82.929 L146.431 47.574 C142.526 43.668 136.195 43.668 132.289 47.574 Z" fill="#ffffff" fill-opacity="1" stroke="none"/>
|
||||
<path id="Path-1" d="M139.36 40.503 C112.024 13.166 67.702 13.166 40.365 40.503 13.029 67.839 13.029 112.161 40.365 139.497 67.702 166.834 112.024 166.834 139.36 139.497 166.697 112.161 166.697 67.839 139.36 40.503 Z" fill="#ffffff" fill-opacity="1" stroke="none"/>
|
||||
</g>
|
||||
<path id="Rounded-Rectangle-copy-2" d="M309.066 97.071 C312.971 93.166 312.971 86.834 309.066 82.929 L259.569 33.431 C255.663 29.526 249.332 29.526 245.426 33.431 L195.929 82.929 C192.024 86.834 192.024 93.166 195.929 97.071 L245.426 146.569 C249.332 150.474 255.663 150.474 259.569 146.569 Z" fill="#00a2ff" fill-opacity="1" stroke="none"/>
|
||||
<defs>
|
||||
<linearGradient id="linear-gradient-2" gradientUnits="userSpaceOnUse" x1="283.044" y1="86.126" x2="405.807" y2="89.926">
|
||||
<stop offset="0" stop-color="#21a9ff" stop-opacity="1"/>
|
||||
<stop offset="1" stop-color="#fa3ebe" stop-opacity="1"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path id="Ellipse-copy-1" d="M252.497 153.64 C287.645 188.787 344.63 188.787 379.777 153.64 414.924 118.492 414.924 61.508 379.777 26.36 344.63 -8.787 287.645 -8.787 252.497 26.36 217.35 61.508 217.35 118.492 252.497 153.64 Z" fill-opacity="1" fill="url(#linear-gradient-2)" stroke="none"/>
|
||||
<g id="New-Group-copy-2">
|
||||
<path id="Rounded-Rectangle-copy-1-1" d="M309.066 97.071 C312.971 93.166 312.971 86.834 309.066 82.929 L259.569 33.431 C255.663 29.526 249.332 29.526 245.426 33.431 L195.929 82.929 C192.024 86.834 192.024 93.166 195.929 97.071 L245.426 146.569 C249.332 150.474 255.663 150.474 259.569 146.569 Z" fill="#00a2ff" fill-opacity="1" stroke="none"/>
|
||||
<defs>
|
||||
<linearGradient id="linear-gradient-3" gradientUnits="userSpaceOnUse" x1="283.044" y1="86.126" x2="405.807" y2="89.926">
|
||||
<stop offset="0" stop-color="#21a9ff" stop-opacity="1"/>
|
||||
<stop offset="1" stop-color="#fa3ebe" stop-opacity="1"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path id="Ellipse-copy-1" d="M252.497 153.64 C287.645 188.787 344.63 188.787 379.777 153.64 414.924 118.492 414.924 61.508 379.777 26.36 344.63 -8.787 287.645 -8.787 252.497 26.36 217.35 61.508 217.35 118.492 252.497 153.64 Z" fill-opacity="1" fill="url(#linear-gradient-3)" stroke="none"/>
|
||||
</g>
|
||||
<g id="New-Group-copy-1">
|
||||
<path id="Path-2" d="M309.066 97.071 C312.971 93.166 312.971 86.834 309.066 82.929 L273.711 47.574 C269.805 43.668 263.474 43.668 259.569 47.574 L224.213 82.929 C220.308 86.834 220.308 93.166 224.213 97.071 L259.569 132.426 C263.474 136.332 269.805 136.332 273.711 132.426 Z" fill="#ffffff" fill-opacity="1" stroke="none"/>
|
||||
<path id="Path-3" d="M266.64 139.497 C293.976 166.834 338.298 166.834 365.635 139.497 392.971 112.161 392.971 67.839 365.635 40.503 338.298 13.166 293.976 13.166 266.64 40.503 239.303 67.839 239.303 112.161 266.64 139.497 Z" fill="#ffffff" fill-opacity="1" stroke="none"/>
|
||||
</g>
|
||||
<defs>
|
||||
<linearGradient id="linear-gradient-4" gradientUnits="userSpaceOnUse" x1="217.142" y1="75.858" x2="259.569" y2="33.431">
|
||||
<stop offset="0" stop-color="#00a2ff" stop-opacity="1"/>
|
||||
<stop offset="1" stop-color="#003758" stop-opacity="1"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path id="Rectangle-copy" d="M224.213 82.929 L266.64 40.503 252.497 26.36 210.071 68.787 Z" fill-opacity="1" fill="url(#linear-gradient-4)" stroke="none"/>
|
||||
<path id="Ellipse-copy-2" d="M267.347 25.653 C263.441 21.748 257.11 21.748 253.205 25.653 249.299 29.559 249.299 35.89 253.205 39.795 257.11 43.701 263.441 43.701 267.347 39.795 271.252 35.89 271.252 29.559 267.347 25.653 Z" fill="#003758" fill-opacity="1" stroke="none"/>
|
||||
<g id="New-Group">
|
||||
<defs>
|
||||
<radialGradient id="radial-gradient" gradientUnits="userSpaceOnUse" cx="89.863" cy="89.707" r="70" fx="89.863" fy="89.707">
|
||||
<stop offset="0" stop-color="#fdbe2e" stop-opacity="1"/>
|
||||
<stop offset="1" stop-color="#fe594d" stop-opacity="1"/>
|
||||
</radialGradient>
|
||||
</defs>
|
||||
<path id="Path-4" d="M139.153 138.997 L139.36 40.209 40.573 40.417 40.365 139.204 Z" fill-opacity="1" fill="url(#radial-gradient)" stroke="none"/>
|
||||
<g id="New-Group-1">
|
||||
<path id="Path-copy-3" d="M40.791 40.198 C42.655 38.558 59.617 22.823 78.978 40.198 90.941 50.554 90.349 67.616 101.174 78.441 130.199 103.448 163.051 63.9 139.383 40.232 133.482 34.301 125.463 30.964 117.097 30.958 L63.143 30.947 C54.777 30.958 46.758 34.289 40.847 40.209" fill="#ffffff" fill-opacity="1" stroke="none"/>
|
||||
<path id="Path-copy-2" d="M40.814 138.778 C39.162 136.926 23.439 119.953 40.814 100.592 51.158 88.618 68.209 89.22 79.045 78.385 104.064 49.371 64.527 16.529 40.858 40.198 34.925 46.096 31.588 54.117 31.585 62.483 L31.563 116.449 C31.569 124.82 34.91 132.843 40.847 138.745" fill="#ffffff" fill-opacity="1" stroke="none"/>
|
||||
<path id="Path-copy-1" d="M139.371 138.778 C137.519 140.43 120.546 156.153 101.185 138.778 89.211 128.434 89.802 111.371 78.978 100.547 49.964 75.528 17.123 115.065 40.791 138.734 46.692 144.664 54.711 148.001 63.077 148.007 L117.053 148.018 C125.417 148.002 133.432 144.666 139.338 138.745" fill="#ffffff" fill-opacity="1" stroke="none"/>
|
||||
<path id="Path-copy" d="M139.282 40.31 C140.934 42.162 156.657 59.135 139.282 78.496 128.926 90.459 111.875 89.856 101.04 100.692 76.032 129.717 115.569 162.558 139.238 138.89 145.171 132.991 148.508 124.971 148.511 116.605 L148.522 62.628 C148.516 54.262 145.179 46.244 139.249 40.343" fill="#ffffff" fill-opacity="1" stroke="none"/>
|
||||
</g>
|
||||
</g>
|
||||
<g id="New-Group-copy">
|
||||
<defs>
|
||||
<radialGradient id="radial-gradient-1" gradientUnits="userSpaceOnUse" cx="317.138" cy="89.293" r="70" fx="317.138" fy="89.293">
|
||||
<stop offset="0" stop-color="#fdbe2e" stop-opacity="1"/>
|
||||
<stop offset="1" stop-color="#fe594d" stop-opacity="1"/>
|
||||
</radialGradient>
|
||||
</defs>
|
||||
<path id="Path-5" d="M267.847 40.003 L267.64 138.79 366.428 138.583 366.635 39.795 Z" fill-opacity="1" fill="url(#radial-gradient-1)" stroke="none"/>
|
||||
<g id="New-Group-2">
|
||||
<path id="Path-copy-3-1" d="M366.209 138.801 C364.346 140.442 347.384 156.176 328.022 138.801 316.06 128.446 316.651 111.383 305.827 100.559 276.802 75.551 243.949 115.099 267.618 138.768 273.519 144.699 281.538 148.035 289.903 148.041 L343.857 148.052 C352.223 148.042 360.242 144.71 366.153 138.79" fill="#ffffff" fill-opacity="1" stroke="none"/>
|
||||
<path id="Path-copy-2-1" d="M366.187 40.221 C367.838 42.074 383.562 59.047 366.187 78.408 355.842 90.382 338.791 89.779 327.955 100.615 302.937 129.629 342.474 162.47 366.142 138.801 372.075 132.903 375.413 124.883 375.415 116.517 L375.438 62.551 C375.432 54.18 372.09 46.156 366.153 40.255" fill="#ffffff" fill-opacity="1" stroke="none"/>
|
||||
<path id="Path-copy-1-1" d="M267.629 40.221 C269.481 38.57 286.454 22.847 305.816 40.221 317.789 50.566 317.198 67.628 328.022 78.453 357.036 103.472 389.878 63.935 366.209 40.266 360.308 34.335 352.289 30.999 343.924 30.993 L289.947 30.982 C281.584 30.998 273.569 34.333 267.662 40.255" fill="#ffffff" fill-opacity="1" stroke="none"/>
|
||||
<path id="Path-copy-1" d="M267.718 138.69 C266.067 136.837 250.343 119.864 267.718 100.503 278.074 88.541 295.125 89.143 305.961 78.308 330.968 49.283 291.431 16.441 267.763 40.11 261.83 46.008 258.492 54.028 258.49 62.395 L258.478 116.372 C258.485 124.737 261.821 132.756 267.752 138.656" fill="#ffffff" fill-opacity="1" stroke="none"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 10 KiB |
Loading…
x
Reference in New Issue
Block a user