Unverified Commit 7a173f82 authored by Eli Schwartz's avatar Eli Schwartz
Browse files

db-archive: check whether we are already ${ARCHIVEUSER} before sudoing.

parent 70adbd1a
......@@ -7,7 +7,7 @@ if (( $# != 1 )); then
exit 1
fi
if [[ -n ${ARCHIVEUSER} ]]; then
if [[ -n ${ARCHIVEUSER} && ${USER} != ${ARCHIVEUSER} ]]; then
exec sudo -u "${ARCHIVEUSER}" "${BASH_SOURCE[0]}" "${@}"
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment