systemd-redis_multiple_servers@.service 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # example systemd template service unit file for multiple redis-servers
  2. #
  3. # You can use this file as a blueprint for your actual template service unit
  4. # file, if you intend to run multiple independent redis-server instances in
  5. # parallel using systemd's "template unit files" feature. If you do, you will
  6. # want to choose a better basename for your service unit by renaming this file
  7. # when copying it.
  8. #
  9. # Please take a look at the provided "systemd-redis_server.service" example
  10. # service unit file, too, if you choose to use this approach at managing
  11. # multiple redis-server instances via systemd.
  12. [Unit]
  13. Description=Redis data structure server - instance %i
  14. Documentation=https://redis.io/documentation
  15. # This template unit assumes your redis-server configuration file(s)
  16. # to live at /etc/redis/redis_server_<INSTANCE_NAME>.conf
  17. AssertPathExists=/etc/redis/redis_server_%i.conf
  18. #Before=your_application.service another_example_application.service
  19. #AssertPathExists=/var/lib/redis
  20. [Service]
  21. ExecStart=/usr/local/bin/redis-server /etc/redis/redis_server_%i.conf
  22. LimitNOFILE=10032
  23. NoNewPrivileges=yes
  24. #OOMScoreAdjust=-900
  25. #PrivateTmp=yes
  26. Type=notify
  27. TimeoutStartSec=infinity
  28. TimeoutStopSec=infinity
  29. UMask=0077
  30. #User=redis
  31. #Group=redis
  32. #WorkingDirectory=/var/lib/redis
  33. [Install]
  34. WantedBy=multi-user.target