https://github.com/stefanpejcic/file-watcher
Auto-reload services when changes are detected in BIND or Nginx configuration files. 📄 👀 🤙🏼
https://github.com/stefanpejcic/file-watcher
bind inotify named nginx
Last synced: 11 days ago
JSON representation
Auto-reload services when changes are detected in BIND or Nginx configuration files. 📄 👀 🤙🏼
- Host: GitHub
- URL: https://github.com/stefanpejcic/file-watcher
- Owner: stefanpejcic
- Created: 2024-06-25T08:28:32.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-13T08:59:57.000Z (almost 2 years ago)
- Last Synced: 2024-07-13T10:18:14.028Z (almost 2 years ago)
- Topics: bind, inotify, named, nginx
- Language: Shell
- Homepage: https://pejcic.rs
- Size: 49.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# file-watcher 📄 👀 🤙🏼
Auto-reload services when changes are detected in configuration files
- **nginx** - when new conf is added in `/etc/nginx/sites-available/`, run [`opencli domain-ssl `](https://dev.openpanel.co/cli/commands.html#SSL), [`nginx -t`](https://www.oreilly.com/library/view/nginx-troubleshooting/9781785288654/ch01s02.html) and [`nginx -s reload`](https://nginx.org/en/docs/beginners_guide.html#control)
- **nginx** - when change is detected in `/etc/nginx/sites-available/`, run [`nginx -t`](https://www.oreilly.com/library/view/nginx-troubleshooting/9781785288654/ch01s02.html) and [`nginx -s reload`](https://nginx.org/en/docs/beginners_guide.html#control)
- **named** - when change is detected in `/etc/bind/zones/`, run [`named-checkzone`](https://linux.die.net/man/8/named-checkzone) and [`rndc reload`](https://docs.oracle.com/cd/E19253-01/816-4556/dnsref-8/index.html)
- **systemd** - when change is detected in `/etc/systemd/system/`, run [`systemctl daemon-reload`](https://www.man7.org/linux/man-pages/man1/systemctl.1.html)
- **phpmyadmin** - when change is detected in `/etc/openpanel/openpanel/core/users/`, run [`opencli phpmyadmin --enable`](#)
- **openadmin** - when change is detected in `/usr/local/admin/`, run [`service admin reload`](https://dev.openpanel.co/services.html#OpenAdmin)
- **watcher** - when change is detected in `/usr/local/admin/scripts/watcher/`, run [`service watcher restart`](#)
## Install
```bash
bash <(curl -sSL https://raw.githubusercontent.com/stefanpejcic/file-watcher/main/install.sh)
```
## Todo:
- rm ssl on conf delete
- queue to recheck ssl in bg
-