]> git.proxmox.com Git - pve-access-control.git/blob - debian/postinst
fix #2079: activate authkey rotation every 24 hours
[pve-access-control.git] / debian / postinst
1 #!/bin/sh
2
3 set -e
4
5 #DEBHELPER#
6
7 case "$1" in
8 configure)
9 if test -n "$2"; then
10
11 # TODO: remove once PVE 7.0 is released
12 if dpkg --compare-versions "$2" 'lt' '6.0-0+1'; then
13 if test ! -e /etc/pve/authkey.pub.old; then
14 # reset key age to prevent immediate invalidation of all current tickets
15 touch -d "-2 hours" /etc/pve/authkey.pub || true
16 fi
17 fi
18
19 fi
20 ;;
21
22 esac
23
24 exit 0