Update readme

pull/89/head
Joel Gray 1 year ago
parent 718c050ff7
commit 85f913fb2b
  1. 58
      README.md
  2. 0
      cloudflare-dns-updater-v6.sh
  3. 0
      cloudflare-dns-updater.sh

@ -1,42 +1,66 @@
# Cloudflare Dynamic DNS IP Updater
<img alt="GitHub" src="https://img.shields.io/github/license/K0p1-Git/cloudflare-ddns-updater?color=black"> <img alt="GitHub last commit (branch)" src="https://img.shields.io/github/last-commit/K0p1-Git/cloudflare-ddns-updater/main"> <img alt="GitHub contributors" src="https://img.shields.io/github/contributors/K0p1-Git/cloudflare-ddns-updater">
This script is used to update Dynamic DNS (DDNS) service based on Cloudflare! Access your home network remotely via a custom domain name without a static IP! Written in pure BASH.
## Support Me
[![Donate Via Paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.me/Jasonkkf)
This version of this script allows you to update multiple domains/sub domains with the same public IP for IPv4, IPv6 version remains per single domain.
## Installation
## Clone
```bash
git clone https://github.com/K0p1-Git/cloudflare-ddns-updater.git
git clone https://github.com/joeltgray/cloudflare-ddns-updater.git
```
## Usage
This script is used with crontab. Specify the frequency of execution through crontab.
This version of the script is used with systemd. Update the paths in config below to match your setup.
If you need to know how to use systemd services check out my blog here:
[Running A Service on Systemd](https://graycode.ie/blog/run-anything-as-a-service-on-linux/)
```bash
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12)
# │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday 7 is also Sunday on some systems)
# │ │ │ │ │ ┌───────────── command to issue
# │ │ │ │ │ │
# │ │ │ │ │ │
# * * * * * /bin/bash {Location of the script}
### Make the service file
`nano /etc/systemd/system/cloudflare-ddns-updater.service`
```
[Unit]
Description=Service to update Cloudflare servers with this servers public IP
[Service]
ExecStart=/bin/bash /path/to/your/cloudflare-ddns-updater/cloudflare-updater.sh
Restart=
EnvironmentFile=/etc/environment
[Install]
WantedBy=multi-user.target
```
### Make the service timer file
`nano /etc/systemd/system/cloudflare-ddns-updater.timer`
```
[Unit]
Description=Run the script for Cloudflare SDNS updates every 5 minutes
[Timer]
OnCalendar=*-*-* *:00/5:05
OnBootSec=5
Persistent=true
[Install]
WantedBy=timers.target
```
## Tested Environments:
Original:
macOS Mojave version 10.14.6 (x86_64) <br />
AlmaLinux 9.3 (Linux kernel: 5.14.0 | x86_64) <br />
Debian Bullseye 11 (Linux kernel: 6.1.28 | aarch64) <br />
This version:
Debian 11 (Linux kernel: 6.1.0-0.deb11.13-amd64 | x86_64) <br />
Arch rolling (Linux kernel: 6.7.4-arch1-1 | x86_64) <br />
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
## Reference
This script was made with reference from [Keld Norman](https://www.youtube.com/watch?v=vSIBkH7sxos) video.
This script was originally made by [Keld Norman](https://www.youtube.com/watch?v=vSIBkH7sxos) video, I've adapted from [Jason K](https://github.com/K0p1-Git)'s version
## License
[MIT](https://github.com/K0p1-Git/cloudflare-ddns-updater/blob/main/LICENSE)

Loading…
Cancel
Save