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

fix systemd

This commit is contained in:
Yalh 2019-01-28 23:23:53 +01:00
parent ff16af0897
commit 06d9bf0e94
2 changed files with 7 additions and 2 deletions

View file

@ -6,8 +6,9 @@ After=network.target
Type=simple Type=simple
User=__APP__ User=__APP__
Group=__APP__ Group=__APP__
Environment="PATH=__ENV_PATH__"
WorkingDirectory=__FINALPATH__/ WorkingDirectory=__FINALPATH__/
ExecStart=ts-node --project __FINALPATH__/tsconfig.json __FINALPATH__/bin/server.ts >> /var/log/__APP__/__APP__.log 2>&1 ExecStart=/bin/bash -c 'ts-node --project __FINALPATH__/tsconfig.json __FINALPATH__/bin/server.ts >> /var/log/__APP__/__APP__.log 2>&1'
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View file

@ -170,13 +170,15 @@ ynh_system_user_create $app
ynh_install_nodejs 8 ynh_install_nodejs 8
chown -R $app $final_path
pushd $final_path pushd $final_path
ynh_use_nodejs ynh_use_nodejs
npm install hoek@^4.2.1 --save npm install hoek@^4.2.1 --save
npm install npm install
npm audit fix npm audit fix
npm install typescript@>=2.0 --save npm install typescript@>=2.0 --save
npm install -g ts-node npm install ts-node
popd popd
#npm audit fix #npm audit fix
@ -186,6 +188,7 @@ popd
#npm install -g ts-node #npm install -g ts-node
#npm install typescript@>=2.0 --save #npm install typescript@>=2.0 --save
#npm install @types/node #npm install @types/node
#(cd $final_path && npm install --only=production)
#================================================= #=================================================
# SETUP SYSTEMD # SETUP SYSTEMD
@ -203,6 +206,7 @@ popd
### - And the section "SETUP SYSTEMD" in the upgrade script ### - And the section "SETUP SYSTEMD" in the upgrade script
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_replace_string "__ENV_PATH__" "$PATH" "../conf/systemd.service"
ynh_add_systemd_config ynh_add_systemd_config
#================================================= #=================================================