diff --git a/templates/service_templates/redis.service.erb b/templates/service_templates/redis.service.erb index 63b71c4..88c7470 100644 --- a/templates/service_templates/redis.service.erb +++ b/templates/service_templates/redis.service.erb @@ -1,25 +1,25 @@ [Unit] Description=Redis Advanced key-value store for instance <%= @title %> After=network.target After=network-online.target Wants=network-online.target [Service] RuntimeDirectory=redis RuntimeDirectoryMode=2755 <%# Redis on Xenial is too old for systemd integration -%> <% if @facts['os']['name'] == 'Ubuntu' and @facts['os']['release']['major'] == '16.04' -%> Type=forking ExecStart=/usr/bin/redis-server <%= @redis_file_name %> <% else -%> Type=notify ExecStart=/usr/bin/redis-server <%= @redis_file_name %> --supervised systemd <% end -%> -ExecStop=/usr/bin/redis-server -p <%= @port %> shutdown +ExecStop=/usr/bin/redis-cli -p <%= @port %> shutdown Restart=always User=<%= @service_user %> Group=<%= @service_user %> LimitNOFILE=<%= @ulimit %> [Install] WantedBy=multi-user.target