]> git.proxmox.com Git - proxmox-backup.git/blob - debian/postinst
fix #3070: replace internal with public URLs
[proxmox-backup.git] / debian / postinst
1 #!/bin/sh
2
3 set -e
4
5 #DEBHELPER#
6
7 case "$1" in
8 configure)
9 # modeled after dh_systemd_start output
10 systemctl --system daemon-reload >/dev/null || true
11 if [ -n "$2" ]; then
12 _dh_action=try-reload-or-restart
13 else
14 _dh_action=start
15 fi
16 deb-systemd-invoke $_dh_action proxmox-backup.service proxmox-backup-proxy.service >/dev/null || true
17
18 # FIXME: Remove in future version once we're sure no broken entries remain in anyone's files
19 if grep -q -e ':termproxy::[^@]\+: ' /var/log/proxmox-backup/tasks/active; then
20 echo "Fixing up termproxy user id in task log..."
21 flock -w 30 /var/log/proxmox-backup/tasks/active.lock sed -i 's/:termproxy::\([^@]\+\): /:termproxy::\1@pam: /' /var/log/proxmox-backup/tasks/active
22 fi
23 ;;
24
25 abort-upgrade|abort-remove|abort-deconfigure)
26 ;;
27
28 *)
29 echo "postinst called with unknown argument \`$1'" >&2
30 exit 1
31 ;;
32 esac
33
34 exit 0