summaryrefslogtreecommitdiff
path: root/src/systemd/vyos-hostsd.service
blob: 26e9c745ec5f6202834c49ca95d08924910fdbea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
[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
DefaultDependencies=no

# Seemingly sensible way to say "as early as the system is ready"
# All vyos-hostsd needs is read/write mounted root
After=systemd-remount-fs.service

[Service]
WorkingDirectory=/run/vyos-hostsd
RuntimeDirectory=vyos-hostsd
RuntimeDirectoryPreserve=yes
ExecStart=/usr/bin/python3 -u /usr/libexec/vyos/services/vyos-hostsd
Type=notify
KillMode=process

SyslogIdentifier=vyos-hostsd
SyslogFacility=daemon

Restart=on-failure

User=root
Group=hostsd

[Install]

# 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.
WantedBy=vyos.target