From 115d798b96d615350d4798fbe6be629010aacc96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20Bo=CC=88ning?= Date: Sat, 9 Apr 2022 23:42:02 +0200 Subject: [PATCH] fix: bring topology updates back crontab and with that the topology functions used to be set up from within the info pane. Thinking about it now makes me wonder why I moved it there in the first place - it was clearly a mistake. Since the info pane is not used anymore the topology functions are also not triggered anymore. This commit brings it back as its essential for the relays as long as we don't have the p2p module activated. --- scripts/functions/auto_topology | 5 +++++ scripts/functions/auto_topology_start | 10 ---------- scripts/functions/info_pane | 6 ------ scripts/start-cardano-node | 6 +++++- 4 files changed, 10 insertions(+), 17 deletions(-) create mode 100644 scripts/functions/auto_topology delete mode 100644 scripts/functions/auto_topology_start diff --git a/scripts/functions/auto_topology b/scripts/functions/auto_topology new file mode 100644 index 0000000..75db23f --- /dev/null +++ b/scripts/functions/auto_topology @@ -0,0 +1,5 @@ +function auto_topology { + cp /cfg-templates/crontab /crontab + service cron start + crontab /crontab +} diff --git a/scripts/functions/auto_topology_start b/scripts/functions/auto_topology_start deleted file mode 100644 index b612c2c..0000000 --- a/scripts/functions/auto_topology_start +++ /dev/null @@ -1,10 +0,0 @@ -function auto_topology_start { - echo "Schduling topology cronjobs." - cp /cfg-templates/crontab /crontab - service cron start - crontab /crontab - echo -e "\n" - - # Update topology.json - topology_update --retry --auto-restart -} diff --git a/scripts/functions/info_pane b/scripts/functions/info_pane index 806e2d6..b6a1471 100644 --- a/scripts/functions/info_pane +++ b/scripts/functions/info_pane @@ -2,13 +2,7 @@ function info_pane { source /scripts/init_node_vars - source /scripts/functions/auto_topology_start source /scripts/functions/wait_for_sync - - if [[ $AUTO_TOPOLOGY = "True" ]]; - then - auto_topology_start - fi wait_for_sync 99.98 diff --git a/scripts/start-cardano-node b/scripts/start-cardano-node index 05077d3..8b0be60 100644 --- a/scripts/start-cardano-node +++ b/scripts/start-cardano-node @@ -106,7 +106,6 @@ if [ -z "${COLD_CREATE}" ]; then fi fi - if [ -n "$CREATE" ]; then create_stakepool ${COLD} fi @@ -117,6 +116,11 @@ if [ -n "$START_NODE" ]; then # Start as staking node /scripts/start-stakenode else + if [[ $AUTO_TOPOLOGY = "True" ]]; then + source /scripts/functions/auto_topology + auto_topology + fi + source /scripts/functions/run_node run_node fi