mirror of
https://github.com/YunoHost-Apps/distbin_ynh.git
synced 2024-09-03 18:26:10 +02:00
commit
e95dd56cc8
2 changed files with 3 additions and 1 deletions
|
@ -7,6 +7,7 @@ Type=simple
|
|||
User=__APP__
|
||||
Group=__APP__
|
||||
Environment="PATH=__NODEJS_PATH__"
|
||||
Environment="PORT=__PORT__"
|
||||
WorkingDirectory=__FINALPATH__/
|
||||
ExecStart=__FINALPATH__/node_modules/.bin/ts-node --project __FINALPATH__/tsconfig.json __FINALPATH__/bin/server.ts >> /var/log/__APP__/__APP__.log 2>&1
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ ynh_app_setting_set $app is_public $is_public
|
|||
### - Remove the section "CLOSE A PORT" in the remove script
|
||||
|
||||
# Find a free port
|
||||
port=$(ynh_find_port 8000)
|
||||
port=$(ynh_find_port 8095)
|
||||
# Open this port
|
||||
#yunohost firewall allow --no-upnp TCP $port 2>&1
|
||||
ynh_app_setting_set $app port $port
|
||||
|
@ -200,6 +200,7 @@ popd
|
|||
|
||||
# Create a dedicated systemd config
|
||||
ynh_replace_string "__NODEJS_PATH__" "$nodejs_path" "../conf/systemd.service"
|
||||
ynh_replace_string "__PORT__" "$port" "../conf/systemd.service"
|
||||
ynh_add_systemd_config
|
||||
systemctl start $app
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue