* fix: typo in dns cname permission change (#431)
This typo prevents gravity-sync from continuing and calculating hashes resulting in always considering there are changes to sync
* Update VERSION
* Branding and typos
* 4.0.7
---------
Co-authored-by: Alexandre Perrault <alexperrault@users.noreply.github.com>
* Simple fix for podman to work; whitespace clean up (#396)
* Fix set_pihole_exec to match full container names (#390)
Fix set_pihole_exec to match full container names, rather
than their substrings, by adding begin and end anchors to
the 'docker ps -qf name=PATTERN' being used.
Signed-off-by: William Blew <william@kulian.org>
* Fix the detect_xxx_pihole routines. (#389)
Fix the detect_xxx_pihole routines to respect the configurable
PIHOLE_CONTAINER_IMAGE variable.
The ghcr.io/pi-hole/pihole image is also released by the Pi-hole
project, just as the pihole/pihole image.
This commit enables ghcr.io image usage by adding the following
to the /etc/gravity-sync.conf file:
PIHOLE_CONTAINER_IMAGE='ghcr.io/pi-hole/pihole'
Signed-off-by: William Blew <william@kulian.org>
Co-authored-by: Michael Stanclift <mx@vmstan.com>
* Make check for sudo privileges more accurate (#375)
* Make check for sudo privileges more accurate
The existing method of checking if the Gravity Sync user has sudo rights is flawed, in that it will break if the user is not in the `sudo` group (on Debian based distros) or the `wheel` group (on CentOS/RHEL distros).
A more accurate way of checking if a user has sudo privileges is using `sudo --validate` or `sudo -n true`; both of which return `0` if the user has sudo privileges.
This commit updates the `validate_sudo_status` function to use `sudo --validate` so that Gravity Sync is actually checking if a user has sudo privileges, rather than just checking group memberships.
* Fix bug in patch
---------
Co-authored-by: llamalump <29816026+llamalump@users.noreply.github.com>
* Fix: GS_SSH_PORT can be changed now via 'gravity-sync config <NEW_PORT>' when already set in gravity-sync.conf. Fix: Initial sync of static DHCP and CNAME to 'empty pihole' now works. Enhancement: Various settings now settable via ENV vars (for Docker) (#384)
* SSH custom port: Fixed bug, where GS_SSH_PORT is overwritten by gravity-sync.conf (if set) when calling 'gravity-sync config NEW_SSH_PORT'. Docker enhancements: Made many config-variables settable via ENV vars
* Fixing initial push of CNAME and Static DHCP entries to an 'empty' remote (fixes https://github.com/vmstan/gravity-sync/issues/377)
* Removing unecessary 'export' keyword
* Fixed 'md5_recheck' for the bug https://github.com/vmstan/gravity-sync/issues/377
* Adding ENV documentation
* Fixing typo
* Fixed type and nicely formatted tables with emacs
---------
Co-authored-by: Michael Stanclift <mx@vmstan.com>
* Update VERSION
* Update gravity-sync
---------
Signed-off-by: William Blew <william@kulian.org>
Co-authored-by: Matt Woodson <mwoodson@gmail.com>
Co-authored-by: William Blew <william@kulian.org>
Co-authored-by: Seb Thomson <29816026+rst-ack@users.noreply.github.com>
Co-authored-by: llamalump <29816026+llamalump@users.noreply.github.com>
Co-authored-by: Klaus Zipfel <30482165+systemofapwne@users.noreply.github.com>
* Start 4.0.2
* automate with options
* change random range
* Use tmp to stash service timers
* make redirect silent
* sed not tee
* space
* simple
* Add ssh migration
* shuf not random
* quad
* 4.0.2 Signoff
* attempt to add custom ssh function
* sudo touch
* set port range
* $2
* maybe
* $1
* comment out last line
* $2x2
* $2x3
* $3
* i don't even know
* $2x4
* 22
* ""
* how does this work
* total rewrite of case stack
* [[ ]]
* if two is a number
* INPUT_SSH
* blank
* Add remote target port
* 4.0.1
* Fix version output
* greater than version
* test "downgrade"
* 4.0.1 Ready
* 4.0.0
* drop .sh
* chmod +x
* change pull locations
* push
* change folders
* cleanup extensions
* error with cname push
* backup purge redone
* back to the CORE!
* remove references to backup folder
* rename pihole container image variable
* rename pihole binary variables
* rename docker binary variables
* rename pihole dir variables
* data names
* remote and local
* DNSMASQ folders
* remove dnsmasq
* more variable renames
* fix config location
* fix import path
* validate gs folder fix
* remove references to LOCAL_FOLDR
* updater moving into place
* create update script
* "
* change context?
* remove git check
* add ( back
* Fix automation path
* replace standalone SQLite with FTL
* remote
* adjust docker folder locations
* fix remote location
* remove sqlite validation
* remove all references to cron
* config rewrite
* soruce config file
* remote file not dir
* hidden figures
* config file
* remove references to dropbear
* remove backup cleanup from most tasks
* remove gs folder validation
* remove ssh detection
* static set ssh
* id_rsa
* extra line
* echo lines
* retain previous config file
* isolinear
* ∞
* rearrange info
* remove bash path
* check replication status
* check timer instead
* dev mode against new repo location
* rewrite purge
* path
* add default file owner back
* simpler
* /usr/bin/bash
* fix ftl binary location
* whoami
* remote FTL
* don't delete from remote
* purge it
* remove path not name
* sudo tee
* tee off instead of echo out
* sudo sudo sudo
* sudo all the things
* Even more sudo
* how much more can you sudo
* change keyfile permissions
* remote/local
* all the sudo
* sudo in your rsync
* pull to tmp
* sudo copied
* silence tee
* New keyfile creation method
* send hash to the other side
* saving hashes
* directions are hard
* reverse hash for the other side
* remote ping test from config
* further randomize replication times
* rerandom
* fix bash call to update.sh
* Remove now-unused UI code
* remove legacy distro check code
* UI FILE PERMISSION spelling
* read -r
* GS_INTENT_VALIDATE
* remove intent validation from push
* cleanup tasks
* remove cname opt-out
* remove DNS options
* rename validation and set functions
* import_gs
* replace primary/local
* relocate file owner variables
* set variable for /tmp
* just set file permissions don't bother checking
* set file permissions
* remove extra message
* md5 variable renames
* replacing pri/sec variable names in smart sync
* .gsbackup replaced
* cleanup then
* removing compensation
* More primary and secondary references removed
* README update
* Update README.md
* new md5 variable
* multiple md5 hash logs
* gravity db listed twice
* md52 deletion at remote
* rename on sync
* move after send
* try try again
* this should work
* force it
* now for something completely different
* remove ;
* KISS
* KISS2
* fix hashing lookups
* set remote hash permissions
* vary info output
* remove unused functions
* new docs uploaded for publishing to wiki
* new system requirements
* words
* host
* rewrite install instructions
* rewrite install instructions
* rewrite all the thing
* massive variable renames
* building out dockerfile
* switch to photon
* change all if then style to single line
* cd || exit
* reformat math
* ${SSHPASSWORD} references removed
* OS_SSH_CMD set in variables
* cleanup function calls
* remove old root_check function
* cleaning up more variables
* more variable cleanup
* Line
* rewrite all of pihole detection
* echo_good
* >/dev/null 2>&1
* detecting local message
* sed?
* | sed 's/\s.*$//'
* fix sed
* no more whiches
* 2>/dev/null some more
* massive config rewrite for advanced workflow
* fix prompt
* output remote images
* echo again
* remote again
* cats?
* detect container locations
* fix space
* rewrite remote detection
* remote not local
* don't delete remote
* exec then rsync
* move lines
* enclose
* dont var
* daft
* quotes
* remove variable
* run you booger
* REMOTE
* remove echo_lines
* no config for more commands
* no config again
* shellcheck
* comment cleanup
* spell check is wonderful
* change docker container name output
* escape more quotes
* simpler command for remote side
* scape that?
* maybe less, i dunno
* try both lists again
* change spacing and line breaks
* streamline status icons for configuration
* retrieving remote settings
* error_validate
* disable task
* fix disable task
* detect_gs_peer
* task_purge doesn't use config
* remote message
* fallback
* " "
* comments
* add monitor mode
* Adds .sh script back as upgrader
* upgrader in old script
* reverse logic
* pretty upgrade script
* migration complete
* change template directory
* check for crontab hash
* user not host
* silence hash for crontab check
* warn
* warning
* reword config ending
* missing "
* os-release
* blue
* disable automation doesn't require config
* move stop
* signing off on 4.0
* add path removal to clear_cron
* 3.6.4
* add local folder to path
* templates for systemd timers
* Wantedby
* user root
* Gonna be 3.7
* Remove legacy cron code from automate function
* Core for moving replication jobs into place
* Move stop before copy
* Add Gravity Sync messages
* Service file customization
* Line break
* 10 minutes to sudo
* if active else
* Do things quietly
* Custom exec path
* clear exec start
* warning about cron
* no longer exists
* remove full dns restart
* change conditions for ftl restart
* run reload for non-smart tasks
* 3.6.3
* add user path to crontab
* ""
* include path
* $
* PATH=$PATH
* add Path_Fix
* start 3.6
* Remove backup retention reference
* dbclient_warning removed
* remove extra linebreaks
* remove backup task
* Increased backup and integrity timeouts to 240
* Remove brackets from message codes
* Arrow for info
* Different arrow
* Ain't gonna restore no more
* Abortion aborted
* format change for config test
* All kinds of yes and no
* echo_grav
* Move advanced to the end
* removed custom ssh, ping check and port options from wizard
* primary address changes
* rework user input
* good clean fun
* smaller version text
* less info
* Set push commands to default 240 second timeout
* Remove reference to backup and restore tasks from log output
* Remove backup refs
* Move UI elements over to gs-ui
* Move ICMP to UI
* More UI
* More UI
* UI changes
* Add end config
* Spaces and such
* MOre UI
* UI
* UI UI UI
* UI UI
* echo_blue
* echo_blue too
* switch
* fip flop
* Too blue
* Fix path being run
* =
* Remove ()
* continued cleaning
* Almost done rewriting config
* switch CNAME defaults
* Add CNAME function
* Fixed typo (#269)
* Fix cache wipe (#282)
* Update gs-pull.sh
`restartdns Full restart Pi-hole subsystems
Add 'reload' to update the lists and flush the cache without restarting the DNS server
Add 'reload-lists' to only update the lists WITHOUT flushing the cache or restarting the DNS server`
fixing typo
* Update gs-push.sh
fixing typo
* Update VERSION
* Update gravity-sync.sh
* new version
* Clear backup directory
* Cleanup after updating
* remove backup functions
* Remove reference to backup and restore functions
* Change backup references to copy
* Host
* Remove reference to backup retention
* Remove reference to backup retention
Co-authored-by: Philippe Ouellette <philippeouellette@protonmail.com>
Co-authored-by: djschnei21 <32646250+djschnei21@users.noreply.github.com>
* Fixed typo (#269)
* Fix cache wipe (#282)
* Update gs-pull.sh
`restartdns Full restart Pi-hole subsystems
Add 'reload' to update the lists and flush the cache without restarting the DNS server
Add 'reload-lists' to only update the lists WITHOUT flushing the cache or restarting the DNS server`
fixing typo
* Update gs-push.sh
fixing typo
* Update VERSION
* Update gravity-sync.sh
Co-authored-by: Philippe Ouellette <philippeouellette@protonmail.com>
Co-authored-by: djschnei21 <32646250+djschnei21@users.noreply.github.com>
* Delete all backups
* Remove push/pull files
* Maybe rusty on my Bash
* Don't delete backups if running a backup job
* AND THEN
* different if style
* Just don't delete anything
* Change messages
* BACKUP
* exempt cleanup from backup task
* deactivate sameline
* remove sameline
* Cleanup samelines
* More cleanup
* More sameline cleanup
* Increase timeout
* 3.4.6
* Variables not marked
* MATH
* MATH?
* more math in more places
* NEW MATH
* MAAAAATH
* I don't even know
* Keep trying
* PLEASE
* PLEASE
* Too many tested variables finally worked
* Add backup integrity wait
* silent_error_validate
* silent_error_validate removal
* Add the addition of an Environment Path variable in Crontab (#212)
* Add detection of missing path components and addition of path to crontab
* Fix bug where \n is inserted literally
* Fix `find` command invoke (Issue #220) (#223)
* 3.4.5
Co-authored-by: Michael Thompson <25192401+nh-mike@users.noreply.github.com>
Co-authored-by: benjaminfd <psyko_chewbacca@hotmail.com>
Co-authored-by: Michael Stanclift <vmstan@ms-macbook.local>
* Add backup timeout customization
* Different variable
* remote integrity check
* 3.4.2
* AND THEN
* words
* more words
* Add local backup integrity
* check local backup integrity
* Clarify duplicate backup verbage
* pulling
Co-authored-by: Michael Stanclift <vmstan@ms-constitution.local>
* new first line of script
* no requested
* Abort!
* Test silent folder validation
* sameline
* echo newline
* echo_sameline
* what happened?
* sameline for ssh
* sqlite sameline
* Lower case
* Reset line
* clear line
* Flip the line
* version update
* Backup lowercase
* More lowercase
* Remove file names from standard messages
* Breakout backup message
* Output backup folder size
* Just H
* Invalid replication settings
* Compare updated
* Colors and updates
* Lower case for version output
* For Pihole
* Cron cleanup
* Sudo, or no sudo.
* Branch!
* Silent error validate
* Silent error validate
* Clearing up status messages
* Records
* Primary and secondary
* Gravity database
* Domain Database
* Backup output cleanup
* Move file permission validation into new functions
* Change restart
* UI variables test
* Breakout UI variables into new file
* Unified validation functions
* Replace text strings with variables
* Replace text strings with variables
* Replace logging with variables
* Convert backup to UI variables
* Switch restore to UI variables
* Fix bug where gravity database did not restore
* App validation checks
* Rev to 3.4.0
* Convert Push functions to new strings
* Completing push UI changes
* remove added line
* Move purge to UI strings
* Move automation to UI strings
* Move core strings into UI
* Exit strings
* First pass at hashing UI
* Escape the remote system query (#179)
* hashing committed
Co-authored-by: Michael Stanclift <vmstan@mstanclift-a03.local>
Co-authored-by: Veduco <59983694+Veduco@users.noreply.github.com>
* Fix crash when using remote docker instance (#169)
When trying to compare / sync and where the remote host is based on Docker, an error will be displayed as per below:
invalid argument "pihole1" for "-f, --filter" flag: bad format of filter (expected name=value)
See 'docker ps --help'.
* 3.3.2
Co-authored-by: Michael Thompson <25192401+nh-mike@users.noreply.github.com>
Co-authored-by: Michael Stanclift <vmstan@mstanclift-a03.local>
* Catch up 3.3 (#142)
* 3.2.5 (#140)
Co-authored-by: Michael Stanclift <vmstan@mstanclift-a03.vmware.com>
* Adds backup cleanup back to process
* Add backup cleanup to compare script when no changes are detected.
* Trek reference
* Redundant
* 3.2.6
* 3.2.6
Co-authored-by: Michael Stanclift <vmstan@mstanclift-a03.vmware.com>
Co-authored-by: Michael Stanclift <vmstan@mstanclift-a03.local>
* Beginning 3.3.0 work
* Podman support
* Support for pihole running in a podman container (#138)
* add support for pihole running in a podman container
* revert renaming of DOCKER_CON to CON_NAME to avoid breaking existing installations
Co-authored-by: Michael Stanclift <mstanclift@vmware.com>
* Add sudo to call of Pihole container version
* Use dev branch pipe
* Without origin
* ascii
* rotate logo
* Move config files to settings folder
* MIssed an important one
* Relocate logs files
* Filling empty directory
* Regression of sudo fix
* Logs
* More words
* Change sync frequency options
* Remove backup automation
* Bold questions
* name
* elif
* BACKUP_RETAIN=3
* Remove automation flag
* == not !=
* Rearrange
* IF
* Default to 0
* 15 default
* More words!
* ELSE
* tighter columns
* Instance type
* Y/N
Co-authored-by: Michael Stanclift <vmstan@mstanclift-a03.vmware.com>
Co-authored-by: Michael Stanclift <vmstan@mstanclift-a03.local>
Co-authored-by: Martin F. Schumann <mfs@mfs.name>
* Adds backup cleanup back to process
* Add backup cleanup to compare script when no changes are detected.
* Trek reference
* Redundant
* 3.2.6
* 3.2.6
Co-authored-by: Michael Stanclift <vmstan@mstanclift-a03.local>
* start 3.2.2
* -z
* !=
* “”
* headers
* Change to new PH_EXEC run
* Empty list detection for CNAME
* IGNORE list
* Skip Gravity logic
* oops
* Two == to be super serious
* variables are hard
* change colors
* the colors
* I’m getting rusty
* echo_lines
* 3.2.2
Co-authored-by: Michael Stanclift <vmstan@sovereign.local>
* 3.2.1
* Change FILE_OWNER & RILE_OWNER to use UID:GID (#128)
Adressing #99 - use UID:GID instead names to support pihole docker user.
* Cleanup tabs on main script
* Add pihole version output
* Output version based on Docker type
* AND THEN
* AND THEN AND THEN
* bash version
* add DNSMASQ to output
* Add GS version
* No color
* Custom settings
* VERIFY_PASS
* Reformat Remote info
* Info screen
* ssh v
* rsync
* -e
* no echo, duh
* header
* sqlite3 version output
* sudo git docker versions
* move spacer
* uname
* remove duplicate docs
Co-authored-by: Michael Stanclift <vmstan@sovereign.local>
Co-authored-by: Krzysiek Kurek <kk50657@sgh.waw.pl>