Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

Hidden Figures

Michael Stanclift edited this page Apr 13, 2022 · 15 revisions

There are a series of advanced configuration options that you may need to change to better adapt Gravity Sync to your environment. They can be set at the end of the gravity-sync.conf file. It is suggested that you make any necessary variable changes to this file, as they will supersede the ones located in the core script. If you want to revert back to the Gravity Sync default for any of these settings, just apply a # to the beginning of the line to comment it out.

LOCAL_PIHOLE_DIRECTORY and REMOTE_PIHOLE_DIRECTORY

These variables allow you to change the location of the Pi-hole settings folder on both the local and remote hosts. This is required for Docker installations of Pi-hole. This directory location should be from the root of the file system and be configured without a trailing slash.

  • Default setting in Gravity Sync is /etc/pihole.
  • These variables are set automatically via gravity-sync config function and required if a Docker install is detected.

LOCAL_DNSMASQ_DIRECTORY and REMOTE_DNSMASQ_DIRECTORY

These variables allow you to change the location of the DNSMASQ settings folder on both the local and remote hosts. This is required for Docker installations of Pi-hole. This directory location should be from the root of the file system and be configured without a trailing slash.

  • Default setting in Gravity Sync is /etc/dnsmasq.d.
  • These variables are set automatically via gravity-sync config function and required if a Docker install is detected.

LOCAL_FILE_OWNER and REMOTE_FILE_OWNER

These variables allow you to change the file owner of the Pi-hole gravity database on both the local and remote hosts. This is automatically set for Docker installations but is likely unnecessary on standard installs.

  • Default setting in Gravity Sync is pihole:pihole.
  • These variables are set via gravity-sync config function to 999:999 automatically if a Docker install is detected.

LOCAL_DOCKER_CONTAINER and REMOTE_DOCKER_CONTAINER

These variables allow you to change the name of the Docker container on both the local and remote hosts.

  • Default setting in Gravity Sync is pihole.
  • These variables are set via gravity-sync config function.

GS_SSH_PORT

Gravity Sync is configured by default to use the standard SSH port (22) but if you need to change this, such as if you're traversing a NAT/firewall for a multi-site deployment, you can use a non-standard port. When running gravity-sync config on an install with non-standard SSH ports, you can specify the target SSH port number in the config command.

  • Example: gravity-sync config 1234 (where 1234 is the remote SSH port)
  • Default setting in Gravity Sync is 22.

GS_LOG_REDIRECT

Gravity Sync automated job logs are written to the system's syslog by default. If you would like to redirect these logs to a different location setting this variable to the /full/path/to/log.file with the location you'd like to use instead will accomplish this. If you have already enabled automation, after editing your .conf file, you will need to run the auto command again for the log redirection to be implemented.

  • Default setting is to use syslog for automation logs.
  • Please see Automation for more.