diff --git a/conf/systemd.service b/conf/systemd.service index d90cd4f..8d4ff4f 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -6,10 +6,10 @@ After=network.target Type=simple Environment=NODE_ENV=production Environment="__YNH_NODE_LOAD_PATH__" -Environment=NODE_CONFIG_DIR=__INSTALL_DIR__/sources/config +Environment=NODE_CONFIG_DIR=__INSTALL_DIR__/config User=__APP__ Group=__APP__ -ExecStart=__YNH_NPM__ start +ExecStart=__YNH_NODE__ __INSTALL_DIR__/sources/dist/server.js WorkingDirectory=__INSTALL_DIR__/sources/ StandardOutput=syslog StandardError=syslog diff --git a/scripts/install b/scripts/install index d5ecf0b..b3d0302 100644 --- a/scripts/install +++ b/scripts/install @@ -53,10 +53,10 @@ popd #================================================= ynh_script_progression --message="Adding a config file..." -ynh_add_config --template="default.yaml" --destination="$install_dir/sources/config/production.yaml" +ynh_add_config --template="default.yaml" --destination="$install_dir/config/production.yaml" -chmod 400 "$install_dir/sources/config/production.yaml" -chown "$app:$app" "$install_dir/sources/config/production.yaml" +chmod 400 "$install_dir/config/production.yaml" +chown "$app:$app" "$install_dir/config/production.yaml" #================================================= # SYSTEM CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 44cc1aa..0fa8b06 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -74,10 +74,10 @@ popd #================================================= ynh_script_progression --message="Updating a config file..." -ynh_add_config --template="default.yaml" --destination="$install_dir/sources/config/production.yaml" +ynh_add_config --template="default.yaml" --destination="$install_dir/config/production.yaml" -chmod 400 "$install_dir/sources/config/production.yaml" -chown "$app:$app" "$install_dir/sources/config/production.yaml" +chmod 400 "$install_dir/config/production.yaml" +chown "$app:$app" "$install_dir/config/production.yaml" #================================================= # REAPPLY SYSTEM CONFIGURATIONS