2022-06-09 20:29:02 -05:00
|
|
|
use clap::Parser;
|
2021-12-12 03:32:05 -06:00
|
|
|
|
|
|
|
/// A tool to automatically update DNS entries on Gandi, using it as a dynamic DNS system.
|
2022-11-13 14:36:21 -06:00
|
|
|
#[derive(Parser, Debug, Default)]
|
2022-04-03 20:27:45 -05:00
|
|
|
#[clap(author, version, about, long_about = None, name = "gandi-live-dns")]
|
2021-12-12 03:32:05 -06:00
|
|
|
pub struct Opts {
|
|
|
|
/// The path to the configuration file.
|
2022-04-03 20:27:45 -05:00
|
|
|
#[clap(long)]
|
2021-12-12 03:32:05 -06:00
|
|
|
pub config: Option<String>,
|
2022-11-13 14:36:21 -06:00
|
|
|
/// Skip IPv4 updates.
|
|
|
|
///
|
|
|
|
/// If enabled, any IPv4 (A) records in the configuration file are ignored.
|
|
|
|
#[clap(action, long)]
|
|
|
|
pub skip_ipv4: bool,
|
|
|
|
/// Skip IPv4 updates.
|
|
|
|
///
|
|
|
|
/// If enabled, any IPv6 (AAAA) records in the configuration file are ignored.
|
|
|
|
#[clap(action, long)]
|
|
|
|
pub skip_ipv6: bool,
|
2022-12-18 00:35:54 -06:00
|
|
|
/// Repeat after specified delay, in seconds.
|
2022-12-17 23:53:34 -06:00
|
|
|
///
|
2022-12-18 00:35:54 -06:00
|
|
|
/// If enabled, this will continue to run and perform the updates
|
|
|
|
/// periodically. The first update will happen immediately, and later
|
|
|
|
/// updates will be delayed by this many seconds.
|
|
|
|
///
|
|
|
|
/// This process will not fork, so you may need to use something like
|
|
|
|
/// `nohup` to keep it running in the background.
|
2022-12-17 23:53:34 -06:00
|
|
|
#[clap(long)]
|
|
|
|
pub repeat: Option<u64>,
|
2021-12-12 03:32:05 -06:00
|
|
|
}
|