mirror of
https://github.com/YunoHost-Apps/tiddlywiki_ynh.git
synced 2024-09-03 20:26:34 +02:00
Fix
This commit is contained in:
parent
3efea5700e
commit
ced8e5baad
2 changed files with 15 additions and 2 deletions
|
@ -17,3 +17,16 @@ nodejs_version=14
|
||||||
#=================================================
|
#=================================================
|
||||||
# FUTURE OFFICIAL HELPERS
|
# FUTURE OFFICIAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
# Execute a command as another user
|
||||||
|
# usage: ynh_exec_as USER COMMAND [ARG ...]
|
||||||
|
ynh_exec_as() {
|
||||||
|
local USER=$1
|
||||||
|
shift 1
|
||||||
|
|
||||||
|
if [[ $USER = $(whoami) ]]; then
|
||||||
|
eval "$@"
|
||||||
|
else
|
||||||
|
sudo -u "$USER" "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
|
@ -87,7 +87,7 @@ ynh_add_nginx_config
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE DEDICATED USER
|
# CREATE DEDICATED USER
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring system user ..." --weight=1
|
ynh_script_progression --message="Configuring system user..." --weight=1
|
||||||
|
|
||||||
# Create a system user
|
# Create a system user
|
||||||
ynh_system_user_create --username=$app --home_dir=$final_path
|
ynh_system_user_create --username=$app --home_dir=$final_path
|
||||||
|
@ -99,7 +99,7 @@ ynh_script_progression --message="tiddlywiki..." --weight=2
|
||||||
|
|
||||||
pushd $final_path
|
pushd $final_path
|
||||||
#$nodejs_path/node $final_path/tiddlywiki mywiki --init server
|
#$nodejs_path/node $final_path/tiddlywiki mywiki --init server
|
||||||
ynh_exec_as $app env "$ynh_node_load_PATH" $final_path/ mywiki --init server
|
ynh_exec_as $app env "$ynh_node_load_PATH" $final_path/tiddlywiki mywiki --init server
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue