1# It's not recommended to modify this file in-place, because it will be
2# overwritten during upgrades.  If you want to customize, the best
3# way is to create a file "/etc/systemd/system/httpd.service",
4# containing
5#   .include /lib/systemd/system/memcached.service
6#   ...make your changes here...
7# See https://www.freedesktop.org/software/systemd/man/systemd.service.html
8# for detailed information about available options.
9
10[Unit]
11Description=memcached daemon
12After=network.target
13
14[Service]
15EnvironmentFile=/etc/sysconfig/memcached
16ExecStart=/usr/bin/memcached -p ${PORT} -u ${USER} -m ${CACHESIZE} -c ${MAXCONN} $OPTIONS
17
18# Set up a new file system namespace and mounts private /tmp and /var/tmp directories
19# so this service cannot access the global directories and other processes cannot
20# access this service's directories.
21PrivateTmp=true
22
23# Mounts the /usr, /boot, and /etc directories read-only for processes invoked by this unit.
24ProtectSystem=full
25
26# Ensures that the service process and all its children can never gain new privileges
27NoNewPrivileges=true
28
29# Sets up a new /dev namespace for the executed processes and only adds API pseudo devices
30# such as /dev/null, /dev/zero or /dev/random (as well as the pseudo TTY subsystem) to it,
31# but no physical devices such as /dev/sda.
32PrivateDevices=true
33
34# Required for dropping privileges and running as a different user
35CapabilityBoundingSet=CAP_SETGID CAP_SETUID
36
37[Install]
38WantedBy=multi-user.target
39