Skip to content

Instantly share code, notes, and snippets.

@alexander-ae
Created March 17, 2013 02:27
Show Gist options
  • Save alexander-ae/5179285 to your computer and use it in GitHub Desktop.
Save alexander-ae/5179285 to your computer and use it in GitHub Desktop.
Configuración de memcached para systemd
PORT="11211"
USER="user"
MAXCONN="512"
CACHESIZE="32"
PID="/home/user/.memcached.pid"
OPTIONS=""
[Unit]
Description=memcached daemon
After=network.target
[Service]
EnvironmentFile=/etc/sysconfig/memcached.config
ExecStart=/usr/local/bin/memcached -p ${PORT} -u ${USER} -m ${CACHESIZE} -c ${MAXCONN} -P ${PID} $OPTIONS
ExecStop=/bin/kill -9 'cat ${PID}'; rm ${PID}
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment