summaryrefslogtreecommitdiff
path: root/src/systemd
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-07-25 17:50:06 +0200
committerGitHub <noreply@github.com>2020-07-25 17:50:06 +0200
commitbfbf51acb2d4b6b5fe2d22d39f7259686f98d2a0 (patch)
tree979a245e4b538daf0a7752a1e4f1a62fa6a4c521 /src/systemd
parent1a85e758b105d493bb9d95916816bd206345bc5d (diff)
parentbe8cda7f711a7a26c85b51976c299a6837750a63 (diff)
downloadvyos-1x-bfbf51acb2d4b6b5fe2d22d39f7259686f98d2a0.tar.gz
vyos-1x-bfbf51acb2d4b6b5fe2d22d39f7259686f98d2a0.zip
Merge pull request #423 from thomas-mangin/T2494
systemd: T2494: allow to restart vyos-hostsd without consequence
Diffstat (limited to 'src/systemd')
-rw-r--r--src/systemd/vyos-hostsd.service6
-rw-r--r--src/systemd/vyos-http-api.service8
2 files changed, 5 insertions, 9 deletions
diff --git a/src/systemd/vyos-hostsd.service b/src/systemd/vyos-hostsd.service
index b77335778..26e9c745e 100644
--- a/src/systemd/vyos-hostsd.service
+++ b/src/systemd/vyos-hostsd.service
@@ -1,5 +1,6 @@
[Unit]
Description=VyOS DNS configuration keeper
+Before=vyos-router.service
# Without this option, lots of default dependencies are added,
# among them network.target, which creates a dependency cycle
@@ -14,7 +15,7 @@ WorkingDirectory=/run/vyos-hostsd
RuntimeDirectory=vyos-hostsd
RuntimeDirectoryPreserve=yes
ExecStart=/usr/bin/python3 -u /usr/libexec/vyos/services/vyos-hostsd
-Type=idle
+Type=notify
KillMode=process
SyslogIdentifier=vyos-hostsd
@@ -22,7 +23,6 @@ SyslogFacility=daemon
Restart=on-failure
-# Does't work in Jessie but leave it here
User=root
Group=hostsd
@@ -31,4 +31,4 @@ Group=hostsd
# Note: After= doesn't actually create a dependency,
# it just sets order for the case when both services are to start,
# and without RequiredBy it *does not* set vyos-hostsd to start.
-RequiredBy=cloud-init-local.service vyos-router.service
+WantedBy=vyos.target
diff --git a/src/systemd/vyos-http-api.service b/src/systemd/vyos-http-api.service
index 4fa68b4ff..74a97d193 100644
--- a/src/systemd/vyos-http-api.service
+++ b/src/systemd/vyos-http-api.service
@@ -4,9 +4,8 @@ After=auditd.service systemd-user-sessions.service time-sync.target vyos-router.
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
+Type=notify
KillMode=process
SyslogIdentifier=vyos-http-api
@@ -14,11 +13,8 @@ SyslogFacility=daemon
Restart=on-failure
-# Does't work but leave it here
User=root
Group=vyattacfg
[Install]
-# Installing in a earlier target leaves ExecStartPre waiting
-WantedBy=getty.target
-
+WantedBy=vyos.target