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

Use the correct node path

This commit is contained in:
Luke Murphy 2019-08-07 16:22:55 +02:00
parent f33f85f069
commit c5fe37d30a
No known key found for this signature in database
GPG key ID: 5E2EF5A63E3718CC
3 changed files with 7 additions and 2 deletions

View file

@ -6,7 +6,7 @@ After=network.target
Type=simple
User=__APP__
Group=__APP__
ExecStart=/opt/node_n/bin/ethercalc --port __PORT__ --expire __EXPIRE__
ExecStart=/opt/node_n/n/versions/node/__NODE_VERSION__/bin/ethercalc --port __PORT__ --expire __EXPIRE__
EnvironmentFile=/etc/systemd/system/ethercalc.env
RuntimeMaxSec=86400
Restart=always

View file

@ -6,6 +6,8 @@
pkg_dependencies="redis-server"
node_version="4.8.7"
# =============================================================================
# YUNOHOST 2.7 FORTHCOMING HELPERS
# =============================================================================

View file

@ -58,7 +58,9 @@ ynh_app_setting_set $app port $port
# INSTALL NODEJS
#=================================================
ynh_install_nodejs 4.8.7
ynh_install_nodejs $node_version
ynh_app_setting_set $app node_version $node_version
#=================================================
# INSTALL DEPENDENCIES
@ -100,6 +102,7 @@ ynh_add_systemd_config
ynh_replace_string --match_string="__PORT__" --replace_string=$port --target_file=/etc/systemd/system/ethercalc.service
ynh_replace_string --match_string="__EXPIRE__" --replace_string=$expire --target_file=/etc/systemd/system/ethercalc.service
ynh_replace_string --match_string="__NODE_VERSION__" --replace_string=$node_version --target_file=/etc/systemd/system/ethercalc.service
cp ../conf/ethercalc.env /etc/systemd/system/ethercalc.env