upgpkg: ocaml-integers 0.5.0-1
[arch-packages.git] / memcached / repos / extra-x86_64 / memcached.service.patch
blob8dc8b9235255f9520b016dc5dbae099d0cd39bdf
1 From f74056bec3910ef03b6e993084731b482ba359ba Mon Sep 17 00:00:00 2001
2 From: anthraxx <levente@leventepolyak.net>
3 Date: Wed, 19 Dec 2018 01:00:32 +0100
4 Subject: [PATCH] modern configuration purely using systemd overrides
6 ---
7 scripts/memcached.service | 12 ++++++++++--
8 scripts/memcached@.service | 15 +++++++++------
9 2 files changed, 19 insertions(+), 8 deletions(-)
11 diff --git a/scripts/memcached.service b/scripts/memcached.service
12 index 88a4b8a..3a1e87e 100644
13 --- a/scripts/memcached.service
14 +++ b/scripts/memcached.service
15 @@ -7,6 +7,9 @@
17 # [Service]
18 # Environment=OPTIONS="-l 127.0.0.1,::1"
20 +# To use the "instanced" version of this, just start 'memcached@11211' or
21 +# whatever port you'd like.
24 [Unit]
25 @@ -14,8 +17,13 @@ Description=memcached daemon
26 After=network.target
28 [Service]
29 -EnvironmentFile=/etc/sysconfig/memcached
30 -ExecStart=/usr/bin/memcached -p ${PORT} -u ${USER} -m ${CACHESIZE} -c ${MAXCONN} $OPTIONS
31 +User=memcached
32 +Environment=CACHESIZE=64
33 +Environment=MAXCONN=1024
34 +Environment=LISTEN="-l 127.0.0.1,::1"
35 +Environment=OPTIONS="-o modern,drop_privileges"
36 +ExecStart=/usr/bin/memcached -m ${CACHESIZE} -c ${MAXCONN} $LISTEN $OPTIONS
37 +Restart=always
39 # Set up a new file system namespace and mounts private /tmp and /var/tmp
40 # directories so this service cannot access the global directories and
41 diff --git a/scripts/memcached@.service b/scripts/memcached@.service
42 index 4e9f1d7..e666da9 100644
43 --- a/scripts/memcached@.service
44 +++ b/scripts/memcached@.service
45 @@ -9,18 +9,21 @@
46 # Environment=OPTIONS="-l 127.0.0.1,::1"
48 # To use the "instanced" version of this, just start 'memcached@11211' or
49 -# whatever port you'd like. If /etc/sysconfig/memcached.<port> exists, it
50 -# will be read first, so you can set different parameters for a given
51 -# instance.
52 +# whatever port you'd like.
55 [Unit]
56 Description=memcached daemon
57 After=network.target
59 [Service]
60 -EnvironmentFile=/etc/sysconfig/memcached
61 -EnvironmentFile=-/etc/sysconfig/memcached.%i
62 -ExecStart=/usr/bin/memcached -p %i -u ${USER} -m ${CACHESIZE} -c ${MAXCONN} $OPTIONS
63 +User=memcached
64 +Environment=CACHESIZE=64
65 +Environment=MAXCONN=1024
66 +Environment=LISTEN="-l 127.0.0.1,::1"
67 +Environment=OPTIONS="-o modern,drop_privileges"
68 +ExecStart=/usr/bin/memcached -p %i -m ${CACHESIZE} -c ${MAXCONN} $LISTEN $OPTIONS
69 +Restart=always
71 # Set up a new file system namespace and mounts private /tmp and /var/tmp
72 # directories so this service cannot access the global directories and
73 --
74 2.20.1