add -E to sudo for upgrade script to keep enviroment variables for postgres run

This commit is contained in:
Clemens Schwaighofer
2022-03-29 09:16:03 +09:00
parent 88ea600e1d
commit c7f2197614

View File

@@ -97,7 +97,7 @@ for MODULE in ${MODULE_LIST}; do
# .cache/borg/<postgresql repo id>
CMD_PREFIX="";
if [ "${MODULE}" = "pgsql" ]; then
CMD_PREFIX="sudo -u postgres ";
CMD_PREFIX="sudo -E -u postgres ";
fi;
echo "==== REPOSITORY: ${REPOSITORY}";
borg list ${OPT_REMOTE} --format '{archive}{NL}' ${REPOSITORY}|grep -v "${MODULE},"|