summarylogtreecommitdiffstats
path: root/cms-germany-git.install
blob: 8fe96e4bbc3773be185efcef974ef6f1e51e7705 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
post_upgrade() {
  su -c \
  "chown root:cmsuser /usr/bin/isolate; \
  chmod 4750 /usr/bin/isolate; \
  chown cmsuser:cmsuser /var/local/log/cms; \
  chown cmsuser:cmsuser /var/local/cache/cms; \
  chown cmsuser:cmsuser /var/local/lib/cms; \
  chown cmsuser:cmsuser /var/log/cms; \
  chown cmsuser:cmsuser /var/cache/cms; \
  chown cmsuser:cmsuser /var/lib/cms;" \
  - root
}

post_install() {
  if ! getent passwd cmsuser >/dev/null; then
    useradd cmsuser -M -r -s /bin/false
  fi

  echo ">>> You should add yourself to the cmsuser group:"
  echo ">>>   # usermod -a -G cmsuser <your user>"
  echo ">>> Logout to make the change effective"

  post_upgrade
}

post_remove() {
  echo ">>> You may want to"
  echo ">>>   # userdel cmsuser"
  echo ">>>   # groupdel cmsuser"
}