From 5d4c102c5b62eb2849b19e47466f4f5e95bcd2c0 Mon Sep 17 00:00:00 2001 From: Zen Date: Thu, 3 Mar 2022 00:15:38 -0600 Subject: [PATCH] updated btc template --- ingredients/iron | 4 +++- resources/service-templates/bitcoin | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ingredients/iron b/ingredients/iron index 55a6456..f0f6179 100644 --- a/ingredients/iron +++ b/ingredients/iron @@ -57,9 +57,11 @@ build_service_from_template() { echo "Seems like you've already installed ${SERVICE} here!" echo -en "Would you like to recreate it? ${BLUE}(y/n)${RESET} " read reset - case reset in + case $reset in "Y" | "y") + cat /etc/systemd/system/ sudo rm $SERVICE_FILE + cat /etc/systemd/system/ ;; "N" | "n") echo "Okay, we'll leave it as is." diff --git a/resources/service-templates/bitcoin b/resources/service-templates/bitcoin index 0acdb6b..965946b 100644 --- a/resources/service-templates/bitcoin +++ b/resources/service-templates/bitcoin @@ -1,6 +1,7 @@ [Unit] Description=Bitcoin daemon -After=network.target +After=network-online.target +Wants=network-online.target [Service] Type=notify @@ -10,6 +11,8 @@ ExecStart=BITCOIND --daemonwait --server --pid=HOME/.bitcoin/bitcoind.pid Type=forking PIDFile=HOME/.bitcoin/bitcoind.pid Restart=on-failure +TimeoutStartSec=infinity +TimeoutStopSec=600 KillSignal=SIGINT LimitNOFILE=32768