Files
DynuIPRefresher/README.md

87 lines
2.0 KiB
Markdown
Raw Normal View History

2019-05-10 23:09:30 +02:00
# DynuIPRefresher
2020-04-29 22:02:51 +02:00
A lightweight C++ application to setup a service for refreshing a dynamic IP to the Dynu servers.
2020-04-30 19:37:11 +02:00
Dynu.com is a free DDns service and provides an API.
## Installation
Download the latest Release at [Release_Page](https://github.com/Lukas-Heiligenbrunner/DynuIPRefresher/releases).
I'm providing executables for Debian/Ubuntu (.deb) and RHEL/Debian (.rpm).
But you can still compile the code my your own (see build section).
## Configuration
There is a configuration file `/etc/iprefresher.cfg` where you have to specify the DYNU API key (get it from their homepage), the domainid and your domain.
Furthermore, you can optionally specify a Telegram API key and a Chat ID if you want to be notfied when your local ip changes.
2020-05-01 16:37:15 +02:00
To enable and start the service:
`systemctl enable iprefresher.service` and `systemctl start iprefresher.service`
2019-05-10 23:09:30 +02:00
2019-05-11 11:16:59 +02:00
## Build
2019-05-11 12:18:24 +02:00
## Basic Build
2019-10-26 11:00:57 +02:00
### Download source files
2019-05-11 11:16:59 +02:00
2019-05-10 23:11:01 +02:00
`git clone https://github.com/Lukas-Heiligenbrunner/DynuIPRefresher.git`
2019-05-10 23:14:25 +02:00
2019-10-26 11:00:57 +02:00
### install build dependencies
`libcurl`
`libconfig`
2019-10-26 11:00:57 +02:00
2020-04-30 15:15:01 +02:00
#### Debian:
2019-10-26 11:00:57 +02:00
`apt install libcurl4-openssl-dev`
2020-04-30 15:15:01 +02:00
#### Fedora:
`dnf install libcurl-devel libconfig-devel`
2019-10-26 11:00:57 +02:00
2020-04-30 15:15:01 +02:00
#### Alpine Linux:
Compiler dependencies:
`apk add make cmake g++`
Lib dependencies:
`apk add libcurl curl-dev libconfig libconfig-dev`
Packaging dependencies:
`apk add dpkg rpm`
2019-10-26 11:03:11 +02:00
#### dependencies for package build
`dpkg` --> debian/ubuntu package
`rpmbuild` --> Fedora/RedHat/CentOS package
2019-10-26 11:00:57 +02:00
### cmake project
2019-05-11 11:16:59 +02:00
cd into downloaded files and Generate makefiles:
`cmake -S . -B build`
2019-05-11 11:16:59 +02:00
2019-10-26 11:00:57 +02:00
### compile project
2019-05-11 11:16:59 +02:00
`make`
[root] install it to the system
2019-05-11 11:16:59 +02:00
`make install`
2020-04-30 15:15:01 +02:00
(optional) create Linux packages
2019-05-10 23:09:30 +02:00
`make package`
2019-05-10 23:09:30 +02:00
2019-05-10 23:14:25 +02:00
2019-05-11 12:23:57 +02:00
### Windows cross build
2020-05-06 11:03:39 +02:00
Set Winbuild flag in CMakeList.txt.
Dependencies:
* MinGW Compiler
* MinGW-libcurl
* MinGW-libconfig++
Optional dependencies
* NSIS Pack tool (for creating installer)
* doxygen (for generating html doc)
Some addition configuration of lib paths may be needed in CMakeList.txt.
`make package` will pack it into a NSIS installer for Windows.