summaryrefslogtreecommitdiff
path: root/pcr/trousers/trousers.install
blob: 3725e078b5a9932bcf55be186092e4e03a2353a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
post_install() {
  groupadd -r tss

  useradd -r -g tss -d /var/lib/tpm -s /bin/false tss
  chown -R tss:tss /var/lib/tpm
  chown tss:tss /usr/bin/tcsd

  chown tss:tss /etc/tcsd.conf
  chmod 0600 /etc/tcsd.conf

  udevadm trigger --sysname-match="tpm[0-9]*"
}

post_upgrade() {
  post_install $1
}

pre_remove() {
  systemctl stop tcsd
  userdel tss
}