https://github.com/mcnaveen/googlebot-webhook-trigger
Fire a webhook when GoogleBot visits your website.
https://github.com/mcnaveen/googlebot-webhook-trigger
bash bash-script googlebot googlecrawl hacktoberfest webhook
Last synced: about 2 months ago
JSON representation
Fire a webhook when GoogleBot visits your website.
- Host: GitHub
- URL: https://github.com/mcnaveen/googlebot-webhook-trigger
- Owner: mcnaveen
- License: mit
- Created: 2021-10-11T11:41:21.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-10-11T11:54:02.000Z (over 4 years ago)
- Last Synced: 2024-12-29T18:52:52.350Z (over 1 year ago)
- Topics: bash, bash-script, googlebot, googlecrawl, hacktoberfest, webhook
- Language: Shell
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# 🤖 GoogleBot Webhook Trigger
Fire a webhook when GoogleBot visit your website.
## 💡 How does it work?
Using `tail` and `grep` to monitor the nginx log file. Once it matches the word "GoogleBot" it'll immediately send notification to your telegram
> This script is for Nginx webserver. If you're using different one. Please change the path accordingly.
## 🔧 Script Setup
- Download the [gbotwebhook.sh](https://github.com/mcnaveen/GoogleBot-Webhook-Trigger/blob/main/gbotwebhook.sh) file on your linux server in `root` or `home` (Home Recommended)
- Open the file and add these values (Required)
```sh
webhookURL= PASTE THE WEBHOOK URL HERE
logFile=/var/log/nginx/access.log #Path to your Nginx access log file. (This one is default)
```
> This logFile path is for Nginx webserver. If you're using different one. Please change accordingly.
- Now, Make it executable `chmod +x gbotwebhook.sh`
- Next Setup `systemd` for Running this script continuously
```bash
# Navigate to this Directory
cd /etc/systemd/system
# Create New Service File
touch gbotwebhook.service
# Create a Service file for systemd service
nano gbotwebhook.service
```
- Now paste everything from and save it.
- Reload the systemd and enable the gbotwebhook service
```bash
systemctl daemon-reload
systemctl enable gbotwebhook
systemctl start gbotwebhook
```
- You can Check the service status with
```bash
systemctl status gbotwebhook
```
## ☑ LICENSE
MIT
----
### Shoutout
Similar useful bash scripts:
- Get Isso Comments Notification on your Telegram by Santhosh Veer -
- Get Telegram Notification when GoogleBot visit your website -