mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 10:50:16 +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
|
||||
done
|
||||
|
||||
local APTLOGFILE="$(mktemp)"
|
||||
|
||||
if command -v debconf-apt-progress > /dev/null; then
|
||||
# shellcheck disable=SC2086
|
||||
$SUDO debconf-apt-progress -- ${PKG_INSTALL} "${TO_INSTALL[@]}"
|
||||
$SUDO debconf-apt-progress --logfile "${APTLOGFILE}" -- ${PKG_INSTALL} "${TO_INSTALL[@]}"
|
||||
else
|
||||
# shellcheck disable=SC2086
|
||||
$SUDO ${PKG_INSTALL} "${TO_INSTALL[@]}"
|
||||
|
@ -574,6 +576,7 @@ installDependentPackages(){
|
|||
done
|
||||
|
||||
if [ "$FAILED" -gt 0 ]; then
|
||||
cat "${APTLOGFILE}"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue