summarylogtreecommitdiffstats
path: root/memcached.install
diff options
context:
space:
mode:
Diffstat (limited to 'memcached.install')
-rw-r--r--memcached.install15
1 files changed, 15 insertions, 0 deletions
diff --git a/memcached.install b/memcached.install
new file mode 100644
index 000000000000..660204163b08
--- /dev/null
+++ b/memcached.install
@@ -0,0 +1,15 @@
+post_install() {
+ if ! getent group memcached >/dev/null; then
+ groupadd --system memcached
+ fi
+ if ! getent passwd memcached >/dev/null; then
+ useradd --system -c 'memcached user' -g memcached -d / -s /bin/nologin memcached
+ fi
+}
+
+post_upgrade() {
+ post_install $1
+ if (( $(vercmp $2 1.4.36-1) <= 0 )); then
+ usermod -s /bin/nologin memcached
+ fi
+}