Merge pull request #2031 from Emzy/ops/fix-echo
Quote echo output in prod install
This commit is contained in:
		
						commit
						8d8a9d15c6
					
				@ -1343,7 +1343,7 @@ if [ "${ELEMENTS_LIQUID_ENABLE}" = ON ];then
 | 
				
			|||||||
    echo "[*] Installing Elements crontab"
 | 
					    echo "[*] Installing Elements crontab"
 | 
				
			||||||
    case $OS in
 | 
					    case $OS in
 | 
				
			||||||
        FreeBSD)
 | 
					        FreeBSD)
 | 
				
			||||||
            echo [*] FIXME: must only crontab enabled daemons
 | 
					            echo "[*] FIXME: must only crontab enabled daemons"
 | 
				
			||||||
            osSudo "${ROOT_USER}" crontab -u "${ELEMENTS_USER}" "${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/elements.crontab"
 | 
					            osSudo "${ROOT_USER}" crontab -u "${ELEMENTS_USER}" "${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/elements.crontab"
 | 
				
			||||||
        ;;
 | 
					        ;;
 | 
				
			||||||
    esac
 | 
					    esac
 | 
				
			||||||
@ -1380,33 +1380,33 @@ fi
 | 
				
			|||||||
echo "[*] Installing crontabs"
 | 
					echo "[*] Installing crontabs"
 | 
				
			||||||
case $OS in
 | 
					case $OS in
 | 
				
			||||||
    FreeBSD)
 | 
					    FreeBSD)
 | 
				
			||||||
        echo [*] FIXME: must only crontab enabled daemons
 | 
					        echo "[*] FIXME: must only crontab enabled daemons"
 | 
				
			||||||
        osSudo "${ROOT_USER}" crontab -u "${BITCOIN_USER}" "${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/bitcoin.crontab"
 | 
					        osSudo "${ROOT_USER}" crontab -u "${BITCOIN_USER}" "${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/bitcoin.crontab"
 | 
				
			||||||
        osSudo "${ROOT_USER}" crontab -u "${MINFEE_USER}" "${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/minfee.crontab"
 | 
					        osSudo "${ROOT_USER}" crontab -u "${MINFEE_USER}" "${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/minfee.crontab"
 | 
				
			||||||
    ;;
 | 
					    ;;
 | 
				
			||||||
    Debian)
 | 
					    Debian)
 | 
				
			||||||
        crontab_bitcoin=()
 | 
					        crontab_bitcoin=()
 | 
				
			||||||
        if [ "${BITCOIN_MAINNET_ENABLE}" = ON ];then
 | 
					        if [ "${BITCOIN_MAINNET_ENABLE}" = ON ];then
 | 
				
			||||||
            echo [*] Installing Electrs Mainnet Cronjob
 | 
					            echo "[*] Installing Electrs Mainnet Cronjob"
 | 
				
			||||||
            crontab_bitcoin+="@reboot sleep 30 ; screen -dmS mainnet /bitcoin/electrs/electrs-start-mainnet\n"
 | 
					            crontab_bitcoin+="@reboot sleep 30 ; screen -dmS mainnet /bitcoin/electrs/electrs-start-mainnet\n"
 | 
				
			||||||
        fi
 | 
					        fi
 | 
				
			||||||
        if [ "${BITCOIN_TESTNET_ENABLE}" = ON ];then
 | 
					        if [ "${BITCOIN_TESTNET_ENABLE}" = ON ];then
 | 
				
			||||||
            echo [*] Installing Electrs Testnet Cronjob
 | 
					            echo "[*] Installing Electrs Testnet Cronjob"
 | 
				
			||||||
            crontab_bitcoin+="@reboot sleep 70 ; screen -dmS testnet /bitcoin/electrs/electrs-start-testnet\n"
 | 
					            crontab_bitcoin+="@reboot sleep 70 ; screen -dmS testnet /bitcoin/electrs/electrs-start-testnet\n"
 | 
				
			||||||
        fi
 | 
					        fi
 | 
				
			||||||
        if [ "${BITCOIN_SIGNET_ENABLE}" = ON ];then
 | 
					        if [ "${BITCOIN_SIGNET_ENABLE}" = ON ];then
 | 
				
			||||||
            echo [*] Installing Electrs Signet Cronjob
 | 
					            echo "[*] Installing Electrs Signet Cronjob"
 | 
				
			||||||
            crontab_bitcoin+="@reboot sleep 90 ; screen -dmS signet /bitcoin/electrs/electrs-start-signet\n"
 | 
					            crontab_bitcoin+="@reboot sleep 90 ; screen -dmS signet /bitcoin/electrs/electrs-start-signet\n"
 | 
				
			||||||
        fi
 | 
					        fi
 | 
				
			||||||
        echo "${crontab_bitcoin}" | crontab -u "${BITCOIN_USER}" -
 | 
					        echo "${crontab_bitcoin}" | crontab -u "${BITCOIN_USER}" -
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        crontab_elements=()
 | 
					        crontab_elements=()
 | 
				
			||||||
        if [ "${ELEMENTS_LIQUID_ENABLE}" = ON ];then
 | 
					        if [ "${ELEMENTS_LIQUID_ENABLE}" = ON ];then
 | 
				
			||||||
            echo [*] Installing Liquid Asset Mainnet Cronjob
 | 
					            echo "[*] Installing Liquid Asset Mainnet Cronjob"
 | 
				
			||||||
            crontab_elements+="6 * * * * cd $HOME/asset_registry_db && git pull origin master >/dev/null 2>&1\n"
 | 
					            crontab_elements+="6 * * * * cd $HOME/asset_registry_db && git pull origin master >/dev/null 2>&1\n"
 | 
				
			||||||
        fi
 | 
					        fi
 | 
				
			||||||
        if [ "${ELEMENTS_LIQUIDTESTNET_ENABLE}" = ON ];then
 | 
					        if [ "${ELEMENTS_LIQUIDTESTNET_ENABLE}" = ON ];then
 | 
				
			||||||
            echo [*] Installing Liquid Asset Testnet Cronjob
 | 
					            echo "[*] Installing Liquid Asset Testnet Cronjob"
 | 
				
			||||||
            crontab_elements+="6 * * * * cd $HOME/asset_registry_testnet_db && git pull origin master >/dev/null 2>&1\n"
 | 
					            crontab_elements+="6 * * * * cd $HOME/asset_registry_testnet_db && git pull origin master >/dev/null 2>&1\n"
 | 
				
			||||||
        fi
 | 
					        fi
 | 
				
			||||||
        echo "${crontab_elements}" | crontab -u "${ELEMENTS_USER}" -
 | 
					        echo "${crontab_elements}" | crontab -u "${ELEMENTS_USER}" -
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user