diff options
| -rw-r--r-- | debian/control | 1 | ||||
| -rwxr-xr-x | src/services/vyos-hostsd | 1 | ||||
| -rwxr-xr-x | src/services/vyos-http-api-server | 4 | ||||
| -rw-r--r-- | src/systemd/vyos-hostsd.service | 6 | ||||
| -rw-r--r-- | src/systemd/vyos-http-api.service | 8 | 
5 files changed, 10 insertions, 10 deletions
| diff --git a/debian/control b/debian/control index 089b2d6e2..3a441b47b 100644 --- a/debian/control +++ b/debian/control @@ -36,7 +36,6 @@ Depends: python3,    python3-xmltodict,    python3-pyudev,    python3-voluptuous, -  python3-systemd,    bsdmainutils,    cron,    etherwake, diff --git a/src/services/vyos-hostsd b/src/services/vyos-hostsd index 53ac5a770..0079f7e5c 100755 --- a/src/services/vyos-hostsd +++ b/src/services/vyos-hostsd @@ -592,7 +592,6 @@ if __name__ == '__main__':      socket.bind(SOCKET_PATH)      os.umask(o_mask) -    systemd.daemon.notify('READY=1')      while True:          #  Wait for next request from client          msg_json = socket.recv().decode() diff --git a/src/services/vyos-http-api-server b/src/services/vyos-http-api-server index 3eecaba5a..d5730d86c 100755 --- a/src/services/vyos-http-api-server +++ b/src/services/vyos-http-api-server @@ -28,7 +28,6 @@ import vyos.config  from flask import Flask, request  from waitress import serve -import systemd.daemon  from functools import wraps @@ -394,9 +393,8 @@ if __name__ == '__main__':      signal.signal(signal.SIGTERM, sig_handler) -    systemd.daemon.notify('READY=1')      try:          serve(app, host=server_config["listen_address"],                     port=server_config["port"])      except OSError as e: -        sys.exit(f"OSError {e}") +        print(f"OSError {e}") diff --git a/src/systemd/vyos-hostsd.service b/src/systemd/vyos-hostsd.service index 26e9c745e..b77335778 100644 --- a/src/systemd/vyos-hostsd.service +++ b/src/systemd/vyos-hostsd.service @@ -1,6 +1,5 @@  [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 @@ -15,7 +14,7 @@ WorkingDirectory=/run/vyos-hostsd  RuntimeDirectory=vyos-hostsd  RuntimeDirectoryPreserve=yes  ExecStart=/usr/bin/python3 -u /usr/libexec/vyos/services/vyos-hostsd -Type=notify +Type=idle  KillMode=process  SyslogIdentifier=vyos-hostsd @@ -23,6 +22,7 @@ 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. -WantedBy=vyos.target +RequiredBy=cloud-init-local.service vyos-router.service diff --git a/src/systemd/vyos-http-api.service b/src/systemd/vyos-http-api.service index 74a97d193..4fa68b4ff 100644 --- a/src/systemd/vyos-http-api.service +++ b/src/systemd/vyos-http-api.service @@ -4,8 +4,9 @@ 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=notify +Type=idle  KillMode=process  SyslogIdentifier=vyos-http-api @@ -13,8 +14,11 @@ SyslogFacility=daemon  Restart=on-failure +# Does't work but leave it here  User=root  Group=vyattacfg  [Install] -WantedBy=vyos.target +# Installing in a earlier target leaves ExecStartPre waiting +WantedBy=getty.target + | 
