mirror of
https://github.com/YunoHost-Apps/firefly-iii_ynh.git
synced 2024-09-03 18:36:13 +02:00
Remove not used helpers
This commit is contained in:
parent
dc9bc365e7
commit
96cf73afc9
1 changed files with 0 additions and 23 deletions
|
@ -22,26 +22,3 @@ extra_php_dependencies="php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mysql ph
|
||||||
#=================================================
|
#=================================================
|
||||||
# FUTURE OFFICIAL HELPERS
|
# FUTURE OFFICIAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Execute a command as another user
|
|
||||||
# usage: exec_as USER COMMAND [ARG ...]
|
|
||||||
exec_as() {
|
|
||||||
local USER=$1
|
|
||||||
shift 1
|
|
||||||
|
|
||||||
if [[ $USER = $(whoami) ]]; then
|
|
||||||
eval $@
|
|
||||||
else
|
|
||||||
# use sudo twice to be root and be allowed to use another user
|
|
||||||
sudo sudo -u "$USER" $@
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Composer helpers
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
sudo_path () {
|
|
||||||
sudo env "PATH=$PATH" $@
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue