From 2abd3cf50c6fedf79ce0f01337ef8bb1eb44116e Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Mon, 1 Jul 2019 13:44:34 -0500 Subject: [HTTP API] T1431: check init/vyos-config before starting HTTP API service --- src/systemd/vyos-http-api.service | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/systemd') diff --git a/src/systemd/vyos-http-api.service b/src/systemd/vyos-http-api.service index 509af4816..4fa68b4ff 100644 --- a/src/systemd/vyos-http-api.service +++ b/src/systemd/vyos-http-api.service @@ -1,9 +1,12 @@ [Unit] Description=VyOS HTTP API service -After=auditd.service systemd-user-sessions.service time-sync.target +After=auditd.service systemd-user-sessions.service time-sync.target vyos-router.service +Requires=vyos-router.service [Service] +ExecStartPre=/usr/libexec/vyos/init/vyos-config ExecStart=/usr/bin/python3 -u /usr/libexec/vyos/services/vyos-http-api-server +Type=idle KillMode=process SyslogIdentifier=vyos-http-api @@ -16,5 +19,6 @@ User=root Group=vyattacfg [Install] -WantedBy=multi-user.target +# Installing in a earlier target leaves ExecStartPre waiting +WantedBy=getty.target -- cgit v1.2.3