Compare commits
No commits in common. "a43a0bf80e80f3861653fe9f675f07c5a7ef4ca5" and "7f90f496a9ce9f9ec1c3af7c20650e87588675b8" have entirely different histories.
a43a0bf80e
...
7f90f496a9
32
README.md
32
README.md
@ -18,13 +18,11 @@ ## Contents <!-- omit in toc -->
|
|||||||
- [cfddns.timer](#cfddnstimer)
|
- [cfddns.timer](#cfddnstimer)
|
||||||
- [Activation](#activation)
|
- [Activation](#activation)
|
||||||
- [The log file](#the-log-file)
|
- [The log file](#the-log-file)
|
||||||
- [Using Logwatch to monitor this script](#using-logwatch-to-monitor-this-script)
|
|
||||||
- [Using Logrotate to control log file size](#using-logrotate-to-control-log-file-size)
|
|
||||||
- [Final thoughts](#final-thoughts)
|
- [Final thoughts](#final-thoughts)
|
||||||
|
|
||||||
## cfddns.sh
|
## cfddns.sh
|
||||||
|
|
||||||
### Installation:
|
#### Installation:
|
||||||
|
|
||||||
I recommend putting this script in your */usr/local/bin* directory or somewhere
|
I recommend putting this script in your */usr/local/bin* directory or somewhere
|
||||||
else in your path so it's easy to run.
|
else in your path so it's easy to run.
|
||||||
@ -42,7 +40,7 @@ ### Installation:
|
|||||||
sudo chmod +x /usr/local/bin/cfddns.sh
|
sudo chmod +x /usr/local/bin/cfddns.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
### Usage:
|
#### Usage:
|
||||||
|
|
||||||
If you run the script with no parameters, it will display the help screen. The
|
If you run the script with no parameters, it will display the help screen. The
|
||||||
script accepts several parameters with 2 being required. The parameters are
|
script accepts several parameters with 2 being required. The parameters are
|
||||||
@ -157,7 +155,7 @@ ## cfddns.service
|
|||||||
...
|
...
|
||||||
````
|
````
|
||||||
|
|
||||||
### IP4 and/or IP6
|
#### IP4 and/or IP6
|
||||||
|
|
||||||
The cfddns.service file includes two *ExecStart* lines, one without a specified
|
The cfddns.service file includes two *ExecStart* lines, one without a specified
|
||||||
IP-protocol parameter (default IP4) and the other with the -6 (IP6) parameter.
|
IP-protocol parameter (default IP4) and the other with the -6 (IP6) parameter.
|
||||||
@ -231,7 +229,7 @@ ## cfddns.timer
|
|||||||
2 minutes) for testing then setting it to a more reasonable time (like 15
|
2 minutes) for testing then setting it to a more reasonable time (like 15
|
||||||
minutes) after everything is working.
|
minutes) after everything is working.
|
||||||
|
|
||||||
### Activation
|
#### Activation
|
||||||
|
|
||||||
You can start the timer system immediately via systemctl
|
You can start the timer system immediately via systemctl
|
||||||
|
|
||||||
@ -274,25 +272,10 @@ ## The log file
|
|||||||
DDNS script execution --**
|
DDNS script execution --**
|
||||||
- All log file entries start with a time-stamp in **[square brackets]**
|
- All log file entries start with a time-stamp in **[square brackets]**
|
||||||
|
|
||||||
### Using Logwatch to monitor this script
|
If you are using the Logwatch package to monitor your system, see the README in
|
||||||
|
the /etc/logwatch folder for details about the pre-configured service files
|
||||||
If you are using the Logwatch package to monitor your system, **see the README
|
|
||||||
in the /etc/logwatch folder** for details about the pre-configured service files
|
|
||||||
already done for you :-)
|
already done for you :-)
|
||||||
|
|
||||||
### Using Logrotate to control log file size
|
|
||||||
|
|
||||||
Logrotate is pre-installed on standard Debian/Ubuntu distributions and is a great
|
|
||||||
way to automatically rotate your log files and control how many old logs you
|
|
||||||
keep on your system so they don't accumulate and eat up your disk space.
|
|
||||||
|
|
||||||
I've included a sample configuration file you can copy to your
|
|
||||||
*/etc/logrotate.d/* folder. This file is set up to rotate your logs once a
|
|
||||||
week, keep 3 weeks worth of history (compressed) and delete all logs older than
|
|
||||||
that. The configuration file is located in this git archive at
|
|
||||||
*/etc/logrotate.d/cfddns* and is fully commented to help you customize it to
|
|
||||||
suit your needs.
|
|
||||||
|
|
||||||
## Final thoughts
|
## Final thoughts
|
||||||
|
|
||||||
I'm by no means an expert in BASH scripting and I only program/script as a hobby
|
I'm by no means an expert in BASH scripting and I only program/script as a hobby
|
||||||
@ -300,6 +283,5 @@ ## Final thoughts
|
|||||||
available. So, by all means, please comment, provide feedback and suggestions
|
available. So, by all means, please comment, provide feedback and suggestions
|
||||||
to make this script better! Thanks, I hope this helps someone else out!
|
to make this script better! Thanks, I hope this helps someone else out!
|
||||||
|
|
||||||
Please check out my blog at
|
Please check out my blog at [https://mytechiethoughts.com](https://mytechiethoughts.com) where I tackle
|
||||||
[https://mytechiethoughts.com](https://mytechiethoughts.com) where I tackle
|
|
||||||
problems like this all the time and find free/cheap solutions to tech problems.
|
problems like this all the time and find free/cheap solutions to tech problems.
|
@ -1,15 +0,0 @@
|
|||||||
### Rotate cfddns log file
|
|
||||||
|
|
||||||
# location of log file (-l parameter of script file)
|
|
||||||
/path/to/cfddns.log {
|
|
||||||
|
|
||||||
# rotate log file weekly -- you could also use 'daily', 'monthly' or
|
|
||||||
# specify a size using 'size 100k', for example
|
|
||||||
weekly
|
|
||||||
|
|
||||||
# keep 3 weeks of old logs (3 files) and delete older ones
|
|
||||||
rotate 3
|
|
||||||
|
|
||||||
# compress old log files using gzip (default)
|
|
||||||
compress
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user