Add pre-btcpayserver script

This commit is contained in:
Taylor Helsper 2022-04-20 23:05:25 -05:00
parent bebf945005
commit 7286d72ed7
2 changed files with 12 additions and 0 deletions

View File

@ -14,6 +14,7 @@ RemainAfterExit=yes
ExecStartPre=/usr/bin/is_not_shutting_down.sh ExecStartPre=/usr/bin/is_not_shutting_down.sh
ExecStartPre=/usr/bin/is_mainnet.sh ExecStartPre=/usr/bin/is_mainnet.sh
ExecStartPre=/usr/bin/wait_on_docker_image_install.sh ExecStartPre=/usr/bin/wait_on_docker_image_install.sh
ExecStartPre=+/usr/bin/service_scripts/pre_btcpayserver.sh
ExecStart=/bin/bash -c '. "/etc/profile.d/btcpay-env.sh" && cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker" && . helpers.sh && btcpay_up' ExecStart=/bin/bash -c '. "/etc/profile.d/btcpay-env.sh" && cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker" && . helpers.sh && btcpay_up'
ExecStop=/bin/bash -c '. "/etc/profile.d/btcpay-env.sh" && cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker" && . helpers.sh && btcpay_down' ExecStop=/bin/bash -c '. "/etc/profile.d/btcpay-env.sh" && cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker" && . helpers.sh && btcpay_down'

View File

@ -0,0 +1,11 @@
#!/bin/bash
source /usr/share/mynode/mynode_config.sh
set -x
# Update Bitcoin RPC Password
BTCRPCPW=$(cat /mnt/hdd/mynode/settings/.btcrpcpw)
if [ -f /mnt/hdd/mynode/btcpayserver/.env ]; then
sed -i "s/REMOTE_BTC_RPC_PASSWORD=.*/REMOTE_BTC_RPC_PASSWORD=$BTCRPCPW/g" /mnt/hdd/mynode/btcpayserver/.env
fi