mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-25 14:08:07 +00:00
Add pre-btcpayserver script
This commit is contained in:
parent
bebf945005
commit
7286d72ed7
|
@ -14,6 +14,7 @@ RemainAfterExit=yes
|
|||
ExecStartPre=/usr/bin/is_not_shutting_down.sh
|
||||
ExecStartPre=/usr/bin/is_mainnet.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'
|
||||
ExecStop=/bin/bash -c '. "/etc/profile.d/btcpay-env.sh" && cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker" && . helpers.sh && btcpay_down'
|
||||
|
|
11
rootfs/standard/usr/bin/service_scripts/pre_btcpayserver.sh
Executable file
11
rootfs/standard/usr/bin/service_scripts/pre_btcpayserver.sh
Executable 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
|
Loading…
Reference in New Issue
Block a user