2020-06-22 07:39:37 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
#DEBHELPER#
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
configure)
|
|
|
|
# modeled after dh_systemd_start output
|
|
|
|
systemctl --system daemon-reload >/dev/null || true
|
|
|
|
if [ -n "$2" ]; then
|
|
|
|
_dh_action=try-reload-or-restart
|
|
|
|
else
|
|
|
|
_dh_action=start
|
|
|
|
fi
|
2020-06-22 08:44:26 +00:00
|
|
|
deb-systemd-invoke $_dh_action proxmox-backup.service proxmox-backup-proxy.service >/dev/null || true
|
2020-08-18 16:41:30 +00:00
|
|
|
|
2020-10-20 09:10:12 +00:00
|
|
|
flock -w 30 /etc/proxmox-backup/.datastore.lck sed -i '/^\s\+verify-schedule /d' /etc/proxmox-backup/datastore.cfg
|
|
|
|
|
2020-09-01 14:50:18 +00:00
|
|
|
# FIXME: Remove in future version once we're sure no broken entries remain in anyone's files
|
|
|
|
if grep -q -e ':termproxy::[^@]\+: ' /var/log/proxmox-backup/tasks/active; then
|
|
|
|
echo "Fixing up termproxy user id in task log..."
|
|
|
|
flock -w 30 /var/log/proxmox-backup/tasks/active.lock sed -i 's/:termproxy::\([^@]\+\): /:termproxy::\1@pam: /' /var/log/proxmox-backup/tasks/active
|
2020-08-18 16:41:30 +00:00
|
|
|
fi
|
2020-06-22 07:39:37 +00:00
|
|
|
;;
|
|
|
|
|
|
|
|
abort-upgrade|abort-remove|abort-deconfigure)
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
|
|
|
echo "postinst called with unknown argument \`$1'" >&2
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit 0
|