1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/distbin_ynh.git synced 2024-09-03 18:26:10 +02:00

Change installation steps

This commit is contained in:
yalh76 2019-02-09 00:19:33 +01:00
parent dffe065991
commit d326e36dea
2 changed files with 4 additions and 5 deletions

View file

@ -8,7 +8,7 @@ User=__APP__
Group=__APP__
EnvironmentFile=__FINALPATH__/.env
WorkingDirectory=__FINALPATH__/
ExecStart=/bin/sh -c '__FINALPATH__/node_modules/.bin/ts-node --project __FINALPATH__/tsconfig.json __FINALPATH__/bin/server.ts >> /var/log/__APP__/__APP__.log 2>&1'
ExecStart=/bin/sh -c 'npm start >> /var/log/__APP__/__APP__.log 2>&1'
[Install]
WantedBy=multi-user.target

View file

@ -16,6 +16,7 @@ source /usr/share/yunohost/helpers
ynh_clean_setup () {
### Remove this function if there's nothing to clean before calling the remove script.
read -p "Press any key..."
ynh_clean_check_starting
}
# Exit if an error occurs during the execution of the script
@ -186,10 +187,8 @@ mkdir -p "$final_path/db"
chown -R "$app":"$app" "$final_path"
pushd $final_path
ynh_use_nodejs
sudo -u $app env PATH=$nodejs_path npm add hoek@^4.2.1 --save --production
sudo -u $app env PATH=$nodejs_path npm install ts-node
sudo -u $app env PATH=$nodejs_path npm install --production
sudo -u $app env PATH=$nodejs_path npm audit fix
sudo -u $app env PATH=$nodejs_path npm install --ignore-scripts
sudo -u $app env PATH=$nodejs_path npm run build
popd
#=================================================