Drop root privileges if necessary.
This makes it possible to call dokku commands as root.
This commit is contained in:
5
dokku
5
dokku
@@ -7,6 +7,11 @@ export PLUGIN_PATH=${PLUGIN_PATH:="/var/lib/dokku/plugins"}
|
|||||||
|
|
||||||
[[ $DOKKU_TRACE ]] && set -x
|
[[ $DOKKU_TRACE ]] && set -x
|
||||||
|
|
||||||
|
if [[ $(id -un) != "dokku" && $1 != "plugins-install" ]]; then
|
||||||
|
sudo -u dokku -H $0 "$@"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
receive)
|
receive)
|
||||||
APP="$2"; IMAGE="app/$APP"
|
APP="$2"; IMAGE="app/$APP"
|
||||||
|
|||||||
Reference in New Issue
Block a user