bundlewrap/bundles/raspberrymatic-cert/metadata.py
2022-02-06 20:34:17 +01:00

32 lines
702 B
Python

from shlex import quote
@metadata_reactor.provides(
'letsencrypt/domains',
)
def letsencrypt(metadata):
return {
'letsencrypt': {
'domains': {
metadata.get('raspberrymatic-cert/domain'): {
'start': ['raspberrymatic-cert'],
},
},
},
}
@metadata_reactor.provides(
'systemd-timers/raspberrymatic-cert',
)
def systemd_timers(metadata):
domain = metadata.get('raspberrymatic-cert/domain')
return {
'systemd-timers': {
'raspberrymatic-cert': {
'command': '/opt/raspberrymatic-cert',
'when': 'daily',
}
},
}