mirror of
https://github.com/Retropex/btcpayserver-docker.git
synced 2025-05-12 21:10:42 +02:00
Remove unused tooling from setup
This commit is contained in:
parent
9c15dfd42d
commit
5fac7d2f19
@ -365,15 +365,8 @@ if [[ -f "$BTCPAY_HOST_SSHKEYFILE" ]]; then
|
||||
docker cp "$BTCPAY_HOST_SSHKEYFILE" $(docker ps --filter "name=_btcpayserver_" -q):$BTCPAY_SSHKEYFILE
|
||||
fi
|
||||
|
||||
cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker"
|
||||
. helpers.sh
|
||||
install_tooling
|
||||
|
||||
cd $ORIGINAL_DIRECTORY
|
||||
|
||||
for scriptname in *.sh; do
|
||||
if [ "$scriptname" == "build.sh" -o "$scriptname" == "build-pregen.sh" ] ; then
|
||||
continue;
|
||||
fi
|
||||
echo "Adding symlink of $scriptname to /usr/bin"
|
||||
chmod +x $scriptname
|
||||
rm /usr/bin/$scriptname &> /dev/null
|
||||
ln -s "$(pwd)/$scriptname" /usr/bin
|
||||
done
|
||||
|
||||
|
@ -36,17 +36,8 @@ if ! grep -Fxq "export COMPOSE_HTTP_TIMEOUT=\"180\"" "/etc/profile.d/btcpay-env.
|
||||
echo "Adding COMPOSE_HTTP_TIMEOUT=180 in btcpay-env.sh"
|
||||
fi
|
||||
|
||||
for scriptname in *.sh; do
|
||||
if [ "$scriptname" == "build.sh" ] || \
|
||||
[ "$scriptname" == "build-pregen.sh" ] || \
|
||||
[ "$scriptname" == "btcpay-setclocale.sh" ]; then
|
||||
continue;
|
||||
fi
|
||||
echo "Adding symlink of $scriptname to /usr/bin"
|
||||
chmod +x $scriptname
|
||||
[ -e /usr/bin/$scriptname ] && rm /usr/bin/$scriptname
|
||||
ln -s "$(pwd)/$scriptname" /usr/bin
|
||||
done
|
||||
. helpers.sh
|
||||
install_tooling
|
||||
|
||||
cd "`dirname $BTCPAY_ENV_FILE`"
|
||||
docker-compose -f $BTCPAY_DOCKER_COMPOSE up -d --remove-orphans -t "${COMPOSE_HTTP_TIMEOUT:-180}"
|
||||
|
46
helpers.sh
Executable file
46
helpers.sh
Executable file
@ -0,0 +1,46 @@
|
||||
install_tooling() {
|
||||
scripts=( \
|
||||
"btcpayserver_bitcoind" "bitcoin-cli.sh" "Command line for your Bitcoin instance" \
|
||||
"btcpayserver_clightning_bitcoin" "bitcoin-lightning-cli.sh" "Command line for your Bitcoin C-Lightning instance" \
|
||||
"btcpayserver_lnd_bitcoin" "bitcoin-lncli.sh" "Command line for your Bitcoin LND instance" \
|
||||
"btcpayserver_bgoldd" "bgold-cli.sh" "Command line for your BGold instance" \
|
||||
"btcpayserver_bitcored" "bitcore-cli.sh" "Command line for your Bitcore instance" \
|
||||
"btcpayserver_bitcoinplusd" "bplus-cli.sh" "Command line for your BPlus instance" \
|
||||
"btcpayserver_dashd" "dash-cli.sh" "Command line for your Dash instance" \
|
||||
"btcpayserver_dogecoind" "dogecoin-cli.sh" "Command line for your Dogecoin instance" \
|
||||
"btcpayserver_feathercoind" "feathercoin-cli.sh" "Command line for your Feathercoin instance" \
|
||||
"btcpayserver_groestlcoind" "groestlcoin-cli.sh" "Command line for your Groestlcoin instance" \
|
||||
"btcpayserver_clightning_groestlcoin" "groestlcoin-lightning-cli.sh" "Command line for your Groestlcoin C-Lightning instance" \
|
||||
"btcpayserver_litecoind" "litecoin-cli.sh" "Command line for your Litecoin instance" \
|
||||
"btcpayserver_clightning_litecoin" "litecoin-lightning-cli.sh" "Command line for your Litecoin C-Lightning instance" \
|
||||
"btcpayserver_lnd_litecoin" "litecoin-lncli.sh" "Command line for your Litecoin LND instance" \
|
||||
"btcpayserver_monacoind" "monacoin-cli.sh" "Command line for your Monacoin instance" \
|
||||
"btcpayserver_trezarcoind" "trezarcoin-cli.sh" "Command line for your Trezar instance" \
|
||||
"btcpayserver_viacoind" "viacoin-cli.sh" "Command line for your Viacoin instance" \
|
||||
"*" "btcpay-down.sh" "Command line for stopping all services related to BTCPay Server" \
|
||||
"*" "btcpay-restart.sh" "Command line for restarting all services related to BTCPay Server" \
|
||||
"*" "btcpay-setup.sh" "Command line for restarting all services related to BTCPay Server" \
|
||||
"*" "btcpay-up.sh" "Command line for starting all services related to BTCPay Server" \
|
||||
"*" "btcpay-update.sh" "Command line for updating your BTCPay Server to the latest commit of this repository" \
|
||||
"*" "changedomain.sh" "Command line for changing the external domain of your BTCPay Server" \
|
||||
)
|
||||
|
||||
i=0
|
||||
while [ $i -lt ${#scripts[@]} ]; do
|
||||
scriptname="${scripts[$i+1]}"
|
||||
dependency="${scripts[$i+0]}"
|
||||
comment="${scripts[$i+2]}"
|
||||
|
||||
[ -e /usr/bin/$scriptname ] && rm /usr/bin/$scriptname
|
||||
if [ -e "$scriptname" ]; then
|
||||
if [ "$dependency" == "*" ] || grep -q "$dependency" "$BTCPAY_DOCKER_COMPOSE"; then
|
||||
chmod +x $scriptname
|
||||
ln -s "$(pwd)/$scriptname" /usr/bin
|
||||
echo "Installed $scriptname to /usr/bin: $comment"
|
||||
fi
|
||||
else
|
||||
echo "WARNING: Script $scriptname referenced, but not existing"
|
||||
fi
|
||||
i=`expr $i + 3`
|
||||
done
|
||||
}
|
Loading…
Reference in New Issue
Block a user