Skip to content
Snippets Groups Projects
Commit 8a12a13a authored by Julian's avatar Julian Committed by nd
Browse files

ensure uffd-admin works with arguments containing whitespace

parent 6366a446
No related branches found
No related tags found
1 merge request!54improve packaging
Pipeline #7212 passed
......@@ -6,11 +6,11 @@ export FLASK_APP=/usr/share/uffd/uffd
export CONFIG_FILENAME=/etc/uffd/uffd.cfg
if [ "$(whoami)" = "uffd" ]; then
flask $@
flask "$@"
elif command -v sudo &> /dev/null; then
exec sudo --preserve-env=FLASK_APP,CONFIG_FILENAME -u uffd flask $@
exec sudo --preserve-env=FLASK_APP,CONFIG_FILENAME -u uffd flask "$@"
elif command -v su &> /dev/null; then
exec su -s /bin/sh --preserve-environment uffd -c flask $@
exec su -s /bin/sh --preserve-environment uffd -c flask "$@"
else
echo "Could not not become 'uffd' user, exiting"
exit 255
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment