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
34025d7e9d
commit
e454d22b6d
3 changed files with 16 additions and 3 deletions
|
@ -8,8 +8,7 @@ User=__APP__
|
||||||
Group=__APP__
|
Group=__APP__
|
||||||
WorkingDirectory=__FINALPATH__
|
WorkingDirectory=__FINALPATH__
|
||||||
Environment='NODE_ENV=production'
|
Environment='NODE_ENV=production'
|
||||||
Environment="__YNH_NODE_LOAD_PATH__"
|
ExecStart=__YNH_NODE__ mynewwiki --listen port=__PORT__ #authenticated-user-header=basic
|
||||||
ExecStart=__YNH_NODE_LOAD_PATH__ __FINALPATH__ mynewwiki --listen port=__PORT__ #authenticated-user-header=basic
|
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
|
@ -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
|
||||||
|
}
|
||||||
|
|
|
@ -98,7 +98,8 @@ ynh_script_progression --message="Configuring TiddlyWiki..." --weight=2
|
||||||
|
|
||||||
pushd $final_path
|
pushd $final_path
|
||||||
ynh_use_nodejs
|
ynh_use_nodejs
|
||||||
ynh_npm install -g tiddlywiki
|
#ynh_npm install -g tiddlywiki
|
||||||
|
ynh_exec_as $app $ynh_node_load_PATH $ynh_npm install -g tiddlywiki
|
||||||
tiddlywiki mynewwiki --init server
|
tiddlywiki mynewwiki --init server
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue