Hi, I'm attaching a patch adding memcached.service for systemd[1], based on scripts/memcached.sysv. I'm submitting it as a patch, as one of systemd's great idea is to let upstream ship service files, so the "every distro packager writes his own rc script" issue won't happen again. :)
The only change since memcached.sysv is that -d is not used, since systemd recommends not forking to the background. The patch is also available here: git://github.com/vmiklos/memcached.git Thanks, Miklos [1] http://www.freedesktop.org/wiki/Software/systemd
From 04de2a3abf92025fc9c56759d0a4b3094f37b1ed Mon Sep 17 00:00:00 2001 From: Miklos Vajna <[email protected]> Date: Sat, 24 Sep 2011 11:57:03 +0200 Subject: [PATCH] Add systemd service file --- scripts/memcached.service | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) create mode 100644 scripts/memcached.service diff --git a/scripts/memcached.service b/scripts/memcached.service new file mode 100644 index 0000000..41f6d88 --- /dev/null +++ b/scripts/memcached.service @@ -0,0 +1,10 @@ +[Unit] +Description=memcached daemon +After=network.target + +[Service] +EnvironmentFile=/etc/sysconfig/memcached +ExecStart=/usr/bin/memcached -p $PORT -u $USER -m $CACHESIZE -c $MAXCONN -P /var/run/memcached/memcached.pid $OPTIONS + +[Install] +WantedBy=multi-user.target -- 1.7.6
pgp3UVoRRNzSn.pgp
Description: PGP signature
