mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 19:00:15 +00:00
Log debconf-apt-progress output to show errors in case of failed package install
This commit is contained in:
parent
bfe611dbf1
commit
4f9349b576
1 changed files with 4 additions and 1 deletions
|
@ -552,9 +552,11 @@ installDependentPackages(){
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
local APTLOGFILE="$(mktemp)"
|
||||||
|
|
||||||
if command -v debconf-apt-progress > /dev/null; then
|
if command -v debconf-apt-progress > /dev/null; then
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
$SUDO debconf-apt-progress -- ${PKG_INSTALL} "${TO_INSTALL[@]}"
|
$SUDO debconf-apt-progress --logfile "${APTLOGFILE}" -- ${PKG_INSTALL} "${TO_INSTALL[@]}"
|
||||||
else
|
else
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
$SUDO ${PKG_INSTALL} "${TO_INSTALL[@]}"
|
$SUDO ${PKG_INSTALL} "${TO_INSTALL[@]}"
|
||||||
|
@ -574,6 +576,7 @@ installDependentPackages(){
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$FAILED" -gt 0 ]; then
|
if [ "$FAILED" -gt 0 ]; then
|
||||||
|
cat "${APTLOGFILE}"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue