diff options
Diffstat (limited to 'extra/memcached/memcached.install')
-rw-r--r-- | extra/memcached/memcached.install | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/extra/memcached/memcached.install b/extra/memcached/memcached.install new file mode 100644 index 000000000..d6dca8d23 --- /dev/null +++ b/extra/memcached/memcached.install @@ -0,0 +1,21 @@ +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/bash memcached + fi +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + if getent passwd memcached >/dev/null; then + userdel memcached + fi + if getent group memcached >/dev/null; then + groupdel memcached + fi +} |