summaryrefslogtreecommitdiff
path: root/community/docker/docker.install
blob: f75fd94aa36f0d5e6241575bcbff28a9be3c818c (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
# arg 1:  the new package version
post_install() {
  # create docker group (FS#38029)
  getent group docker >/dev/null || groupadd -g 142 docker
}

# arg 1:  the new package version
# arg 2:  the old package version
post_upgrade() {
  (( $(vercmp $2 '1:0.7.1-1') < 0 )) &&  post_install "$1" || true
  (( $(vercmp $2 '1:1.1.1-2') < 0 )) &&  socketactivation || true
}

# arg 1:  the old package version
post_remove() {
  groupdel docker >/dev/null 2>&1 || true
}

socketactivation() {
  if systemctl -q is-enabled docker; then
    cat << EOF
The docker service switched to socket activation.
We will enable the socket file for you. Don't need to thanks us.
EOF
    systemctl enable docker.socket
  fi
}

# vim:set ts=2 sw=2 et: