Add bashrc file as an alais for interactive shell

This commit is contained in:
Elyan 2024-02-18 04:01:52 -08:00
parent 80680e5556
commit 18333d9140
3 changed files with 26 additions and 0 deletions

11
.bashrc Normal file
View File

@ -0,0 +1,11 @@
# Use bash completion, if available
alais bitcoin-cli="bitcoin-cli -datadir=/root/signet-custom"
# Check if an interactive shell is running
if [ -n "$PS1" ]; then
# Source bash completion, if its available
if [ -f /usr/share/bash-completion/bash_completion]; then
./usr/share/bash-completion/bash_completion
fi
fi

View File

@ -29,6 +29,9 @@ COPY bitcoin.conf /root/.bitcoin/bitcoin.conf
COPY --from=0 /bitcoin/contrib/signet/miner.py /usr/local/bin/
RUN chmod +x /usr/local/bin/miner.py
# Copy the .bashrc file to the container's root directory
COPY .bashrc /root/.bashrc
# Copy the logtail.sh script
COPY logtail.sh .
RUN chmod +x logtail.sh

12
logtail.sh Normal file
View File

@ -0,0 +1,12 @@
#!/bin/sh
set -Eeuo pipefail
# Define the path to your Bitcoin data directory
DATADIR="/root/signet-custom"
# Ensure the debug.log file exists
touch $DATADIR/debug.log
# Show and Tail Bitcoin debug log
tail -n +1 -f $DATADIR/debug.log || true
echo "Tailing the Bitcoin debug log. press Ctrl+c to stop."