mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Default to WorkingDirectory then install_dir for ynh_spawn_app_shell
Co-authored-by: Tagada <36127788+Tagadda@users.noreply.github.com>
This commit is contained in:
parent
cc167cd92c
commit
4b4ce9aef6
1 changed files with 7 additions and 0 deletions
|
@ -178,5 +178,12 @@ ynh_spawn_app_shell() {
|
|||
fi
|
||||
|
||||
# Open the app shell
|
||||
local env_dir = $(systemctl show $app.service -p "WorkingDirectory" --value)
|
||||
if [[ $env_dir = "" ]];
|
||||
then
|
||||
env_dir = $install_dir
|
||||
fi
|
||||
|
||||
cd $env_dir
|
||||
su -s /bin/bash $app
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue