diff --git a/src/sonic-host-services-data/debian/sonic-host-services-data.aaastatsd.service b/src/sonic-host-services-data/debian/sonic-host-services-data.aaastatsd.service index b03c6a9551c0..b93fe92c04ed 100644 --- a/src/sonic-host-services-data/debian/sonic-host-services-data.aaastatsd.service +++ b/src/sonic-host-services-data/debian/sonic-host-services-data.aaastatsd.service @@ -12,6 +12,3 @@ Restart=on-failure RestartSec=10 TimeoutStopSec=3 -[Install] -WantedBy=sonic.target - diff --git a/src/sonic-host-services-data/debian/sonic-host-services-data.aaastatsd.timer b/src/sonic-host-services-data/debian/sonic-host-services-data.aaastatsd.timer new file mode 100644 index 000000000000..e0458ff326f5 --- /dev/null +++ b/src/sonic-host-services-data/debian/sonic-host-services-data.aaastatsd.timer @@ -0,0 +1,11 @@ +[Unit] +Description=Delays aaastatsd daemon until SONiC has started +PartOf=aaastatsd.service + +[Timer] +OnActiveSec=1min 30 sec +Unit=aaastatsd.service + +[Install] +WantedBy=timers.target sonic.target + diff --git a/src/sonic-host-services-data/debian/sonic-host-services-data.hostcfgd.service b/src/sonic-host-services-data/debian/sonic-host-services-data.hostcfgd.service index 4adf2aba77ad..5e2434527124 100644 --- a/src/sonic-host-services-data/debian/sonic-host-services-data.hostcfgd.service +++ b/src/sonic-host-services-data/debian/sonic-host-services-data.hostcfgd.service @@ -9,6 +9,3 @@ After=sonic.target Type=simple ExecStart=/usr/local/bin/hostcfgd -[Install] -WantedBy=sonic.target - diff --git a/src/sonic-host-services-data/debian/sonic-host-services-data.hostcfgd.timer b/src/sonic-host-services-data/debian/sonic-host-services-data.hostcfgd.timer new file mode 100644 index 000000000000..baf80f4b4cbd --- /dev/null +++ b/src/sonic-host-services-data/debian/sonic-host-services-data.hostcfgd.timer @@ -0,0 +1,11 @@ +[Unit] +Description=Delays hostcfgd daemon until SONiC has started +PartOf=hostcfgd.service + +[Timer] +OnActiveSec=1min 30 sec +Unit=hostcfgd.service + +[Install] +WantedBy=timers.target sonic.target +