From b2409e5446d3c552c1eef4b874b610102fce97ca Mon Sep 17 00:00:00 2001 From: bluikko <14869000+bluikko@users.noreply.github.com> Date: Wed, 15 Apr 2020 13:42:21 +0700 Subject: [PATCH] Make sure systemd doesn't try to start NetBox before Redis is ready In some cases Redis will take some seconds to become ready. If NetBox is started with systemd unit file before Redis is ready it will fail with an error. Changing the After/Wants to redis.service will make sure NetBox start is not attempted before Redis signals it is ready. This needs in "supervised systemd" in redis.conf. --- contrib/netbox.service | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/netbox.service b/contrib/netbox.service index 18eb0457c..0e6063962 100644 --- a/contrib/netbox.service +++ b/contrib/netbox.service @@ -1,8 +1,8 @@ [Unit] Description=NetBox WSGI Service Documentation=https://netbox.readthedocs.io/en/stable/ -After=network-online.target -Wants=network-online.target +After=redis.service +Wants=redis.service [Service] Type=simple