telegram-ping-ip/README.md

40 lines
1.2 KiB
Markdown
Raw Normal View History

2021-10-27 07:57:34 +05:00
# Telegram Bot for Sending IP-address of a server if Dynamic IP has changed.
2021-10-27 08:01:08 +05:00
*Inspired by [indicozy/telegram-ping-ip](https://github.com/indicozy/telegram-ping-ip)*
2021-10-27 07:57:34 +05:00
## Getting started.
### Requirements:
* `curl` - Install with whatever package manager you use
* `screen` - *Optional* requirement to run script in background.
### Clone repo and Configure
```bash
git clone https://github.com/shihaamabr/telegram-ping-ip.git
cd telegram-ping-ip
chmod +x telegram-ping-ip.sh screen-telegram-ping-ip.sh
cp env.sample .env
```
- Edit the contents of .env to your config (`nano .env`)
2021-10-28 16:16:57 +05:00
## Running
### Execute the script - Forground
2021-10-27 07:57:34 +05:00
```bash
2021-10-28 16:16:57 +05:00
./telegram-ping-ip.sh - Background
2021-10-27 07:57:34 +05:00
```
2021-10-28 16:16:57 +05:00
### Run the script in a screen
2021-10-27 07:57:34 +05:00
```bash
./screen-telegram-ping-ip.sh
```
2021-10-28 16:16:57 +05:00
### Run at system boot up
* Add it to a crontab, Run: `crontab -e`
2021-10-27 07:57:34 +05:00
```
@reboot /bin/bash /path/to/telegram-ping-ip/screen-telegram-ping-ip.sh
```
## Future plans
* create a daemon, idk, it seems interesting
## Additional Information
**FYI IT pings to `whatismyip.shihaam.me` by default, this can be configured in .env to use `ifconfig.me` or whatever else server.**
## Bugs
- [You tell me :)](https://github.com/shihaamabr/telegram-ping-ip/issues/new)