gowatch

command module
v0.0.0-...-45fb9e5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2023 License: MIT Imports: 2 Imported by: 0

README ยถ

๐Ÿ“ GOWATCH - Keep track of changed files

GOWATCH will keep track off changed files of your choice based on SHA256-Filesum.
Just define files or folders (or mixed-mode) within the settings.json.

screenshot

Example settings.json:

{
    "files": {
      "test": "/home/administrator/test.txt",
      "dir" : "/home/administrator/www"
    }
}

goreleaser

๐Ÿ“ƒ Requirements

Always make sure to have your settings.json in the same folder as the gowatch-binary.
The hashes.json will be recreated, if not moved or deleted. The file event.json is also optional.

๐Ÿ› ๏ธ Usage

If you want to check for file changes on a regular basis, you should add GOWATCH to your Crontab.
For example, to check every minute for changed files:
* * * * * /usr/bin/gowatch/gowatch

It would also be possible to check in realtime, using watch: watch /home/administrator/gowatch/gowatch

๐Ÿ“ Logs

Every time GOWATCH detects a change in one of your files, it will be logged in your syslog:
screenshot

You can also use the file event.json to trigger a custom HTTP-GET, which will automatically attach a new GET-Parameter to your URI, called &logmessage, containing the base64-encoded log-message.

๐Ÿ’ญ Debugmode

You can use the --debug flag / arg to get more details on which changes GOWATCH has detected:
screenshot

ยฉ License

MIT

Documentation ยถ

The Go Gopher

There is no documentation for this package.

Directories ยถ

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL