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