baseline cloud-init script + ddns+acme automation files; populate files with envsubst
This commit is contained in:
parent
b96f6de4ed
commit
0629732449
1 changed files with 47 additions and 0 deletions
47
basic_configs/debian-hetzner-init
Normal file
47
basic_configs/debian-hetzner-init
Normal file
|
@ -0,0 +1,47 @@
|
|||
#cloud-config
|
||||
# vim: syntax=yaml
|
||||
packages:
|
||||
- ufw
|
||||
- nginx
|
||||
- lego
|
||||
- wireguard
|
||||
- python-requests
|
||||
|
||||
package_update: true
|
||||
package_upgrade: true
|
||||
|
||||
write-files:
|
||||
- encoding: b64
|
||||
content: ${WRAPPER_SCRIPT}
|
||||
owner: root:root
|
||||
path: /usr/local/bin/ddns-acme-porkbun
|
||||
permissions: '0744'
|
||||
- encoding: b64
|
||||
content: ${DDNS_SCRIPT}
|
||||
owner: root:root
|
||||
path: /usr/local/bin/ddns-porkbun
|
||||
permissions: '0744'
|
||||
- content: |
|
||||
[Unit]
|
||||
Description=Renew acme certs and DDNS update
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/local/bin/ddns-acme-porkbun renew
|
||||
owner: root:root
|
||||
path: /etc/systemd/system/ddns-acme-porkbun.service
|
||||
permissions: '0644'
|
||||
- content: |
|
||||
[Unit]
|
||||
Description=Renew certs and dns records periodically
|
||||
[Timer]
|
||||
OnCalendar=*-01,03,05,07,09,11-01 02:00:00
|
||||
RandomizedDelaySec=12h
|
||||
Persistent=true
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
owner: root:root
|
||||
path: /usr/local/bin/ddns-acme-porkbun.timer
|
||||
permissions: '0644'
|
||||
|
||||
runcmd:
|
||||
- reboot
|
Loading…
Reference in a new issue