diff --git a/Cargo.toml b/Cargo.toml index 1da0418..e513855 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,16 @@ description = "Application for automatically updating Cloudflare DNS records" license = "GPL-3.0-or-later" [package.metadata.deb] +extended-description = "Application for automatically updating Cloudflare DNS records" +maintainer-scripts = "" revision = "1" + +[package.metadata.deb.systemd-units] +enable = true +start = true +restart-after-upgrade = true +stop-on-upgrde = true + # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] diff --git a/unit-scripts/cloudflare-dns-updater.service b/unit-scripts/cloudflare-dns-updater.service index e69de29..cf21d93 100644 --- a/unit-scripts/cloudflare-dns-updater.service +++ b/unit-scripts/cloudflare-dns-updater.service @@ -0,0 +1,13 @@ +[Unit] +Description="Application for automatically updating Cloudflare DNS records" +After=syslog.target +After=network-online.target + +[Service] +Type=simple +ExecStart=/usr/local/bin/cloudflare-dns-updater +Restart=always +RestartSec=3 + +[Install] +WantedBy=multi-user.target \ No newline at end of file