summarylogtreecommitdiffstats
path: root/nhiicc.install
blob: 1b24b9555eadc2ad866dba89d239fd55f44d5ed6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
post_install() {
  echo 127.0.0.1 iccert.nhi.gov.tw >> /etc/hosts
  echo /etc/hosts is modified to make NHIICC work. Please review its contents if you wish.

  post_upgrade
}

post_upgrade() {
  /usr/share/nhiicc/regen-certs.sh
  cat <<EOF
>>>
>>> Certificates for the NHIICC program are generated. You may need to restart browsers to load new certificates.
>>>
EOF
}

post_remove() {
  sed -i '/iccert\.nhi\.gov\.tw/d' /etc/hosts

  rm -r /var/lib/nhiicc/cert
  rm /etc/ca-certificates/trust-source/anchors/NHIRootCA.crt
  /usr/bin/update-ca-trust
}