diff --git a/resources/ansible/roles/node/defaults/main.yml b/resources/ansible/roles/node/defaults/main.yml index 6e949f1d..2ea279fb 100644 --- a/resources/ansible/roles/node/defaults/main.yml +++ b/resources/ansible/roles/node/defaults/main.yml @@ -1,5 +1,6 @@ --- is_genesis: False +node_service_pre_cmd: otlp_endpoint: http://dev-testnet-infra-f2016fb1217aaf30.elb.eu-west-2.amazonaws.com:4317 node_archive_filename: safenode-latest-x86_64-unknown-linux-musl.tar.gz node_archive_url: https://sn-node.s3.eu-west-2.amazonaws.com/{{ node_archive_filename }} diff --git a/resources/ansible/roles/node/templates/sn_node.service.j2 b/resources/ansible/roles/node/templates/sn_node.service.j2 index cf4821ad..28a4a5db 100644 --- a/resources/ansible/roles/node/templates/sn_node.service.j2 +++ b/resources/ansible/roles/node/templates/sn_node.service.j2 @@ -2,15 +2,17 @@ Description=Safe Node %I [Service] +WorkingDirectory=/home/safe {% if is_genesis %} -ExecStart={{ node_archive_dest_path }}/safenode \ +ExecStart=heaptrack {{ node_archive_dest_path }}/safenode \ --port {{ node_port }} \ --rpc {{ node_rpc_ip }}:{{ node_rpc_port }} {% else %} -ExecStart={{ node_archive_dest_path }}/safenode \ +ExecStart=heaptrack {{ node_archive_dest_path }}/safenode \ --peer {{ genesis_multiaddr }} {% endif %} User=safe + [Install] WantedBy=multi-user.target