letsencrypt.service
:
[Unit]
Description=Renews letsencrypt certificates
After=network.target letsencrypt_concat_fullchain_privkey.service
[Service]
Type=oneshot
WorkingDirectory=/etc/letsencrypt/
ExecStart=/usr/bin/letsencrypt renew
When I start this service manually: sudo systemctl start letsencrypt
it doesn't seem to start the letsencrypt_concat_fullchain_privkey.service
service. I've ran sudo systemctl start letsencrypt_concat_fullchain_privkey.service
and it works as it should.
What I'm trying to do is that when letsencrypt.service
is finished I'd like it to start the letsencrypt_concat_fullchain_privkey.service
service.
After=
does not imply a dependency relationship (only order), you can establish dependency withRequires=
orWants=
directive.Ref: http://freedesktop.org/software/systemd/man/systemd.unit.html
You want to add this to your
letsencrypt.service
file then:This command will then be run serially after the command you gave in
ExecStart=
.You can read more about
ExecStartPost=
inman systemd.service
or look up anysystemd
directive inman systemd.directives
.