Compare commits

..

2 commits

4 changed files with 25 additions and 2 deletions

View file

@ -0,0 +1,13 @@
[Unit]
Description=CertWarden Deployer binary
Documentation=https://code.lila.network/adoralaura/certwarden-deploy
[Service]
# uncomment if you want to use a different user than root
# User=certwarden-deploy
# Group=certwarden-deploy
ExecStart=/usr/local/bin/certwarden-deploy
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,10 @@
[Unit]
Description=Timer for certwarden-deploy
[Timer]
Persistent=true
OnCalendar=Sat *-*-* 04:00:00
RandomizedDelaySec=2h
[Install]
WantedBy=timers.target

View file

@ -198,7 +198,7 @@ func handleCertificateAction(cert configuration.CertificateData) error {
sargs := strings.Split(action, " ") sargs := strings.Split(action, " ")
cmd := exec.Command(sargs[0], sargs...) cmd := exec.Command(sargs[0], sargs[1:]...)
err := cmd.Run() err := cmd.Run()
return err return err
} }

View file

@ -1,6 +1,6 @@
package constants package constants
const Version = "0.1.0" const Version = "0.1.1"
const CertificateApiPath = "/certwarden/api/v1/download/certificates/" const CertificateApiPath = "/certwarden/api/v1/download/certificates/"
const ApiKeyHeaderName = "X-API-Key" const ApiKeyHeaderName = "X-API-Key"
const UserAgent = "certwarden-deploy/" + Version + " +https://code.lila.network/adoralaura/certwarden-deploy" const UserAgent = "certwarden-deploy/" + Version + " +https://code.lila.network/adoralaura/certwarden-deploy"