Add debian packaging files

This commit is contained in:
Edward Shen 2023-07-27 23:25:16 -07:00
parent b20148c73a
commit a17c55292c
Signed by: edward
GPG key ID: 0A400FFE10097C30
3 changed files with 42 additions and 0 deletions

View file

@ -29,3 +29,6 @@ dirs = "5"
strip = "symbols"
lto = "thin"
codegen-units = 1
[package.metadata.deb.systemd-units]
unit-scripts = "systemd/"

View file

@ -0,0 +1,30 @@
[Unit]
Description=Run the Cloudflare DDNS script
Wants=network-online.target
After=network-online.target
[Service]
Type=oneshot
ExecStart=/usr/bin/cloudflare-ddns run
# Security
NoNewPrivileges=true
# Sandboxing config
ProtectSystem=true
PrivateTmp=true
PrivateDevices=true
ProtectHostname=true
ProtectClock=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
RestrictNamespaces=true
LockPersonality=true
MemoryDenyWriteExecute=true
RestrictRealtime=true
RestrictSUIDSGID=true
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,9 @@
[Unit]
Description=Run the Cloudflare DDNS script hourly
[Timer]
OnBootSec=1min
OnUnitActiveSec=1hr
[Install]
WantedBy=timers.target