From 8e937ce4cc1462d996bae6a45e8c0a66f71e7ee6 Mon Sep 17 00:00:00 2001 From: YoongHM Date: Tue, 11 Aug 2020 17:30:32 +0800 Subject: [PATCH] Start redis after network is online (#7639) The two lines allow systemd to start redis.service after the network is online. Only after the network is online that Redis could bind to IP address other than 127.0.0.1 during initial boot up process. --- utils/systemd-redis_server.service | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/systemd-redis_server.service b/utils/systemd-redis_server.service index addee349..cf158644 100644 --- a/utils/systemd-redis_server.service +++ b/utils/systemd-redis_server.service @@ -20,6 +20,8 @@ Description=Redis data structure server Documentation=https://redis.io/documentation #Before=your_application.service another_example_application.service #AssertPathExists=/var/lib/redis +Wants=network-online.target +After=network-online.target [Service] ExecStart=/usr/local/bin/redis-server --supervised systemd --daemonize no