summaryrefslogtreecommitdiff
path: root/extra/memcached/memcached.install
blob: d6dca8d235b2031103dc366650864eee76a8632d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
}