Improve Specter auto-config (run once)
This commit is contained in:
parent
47a96dedd0
commit
9fe8d16251
|
@ -9,7 +9,7 @@ After=bitcoin.service
|
|||
[Service]
|
||||
ExecStartPre=/usr/bin/is_not_shutting_down.sh
|
||||
ExecStartPre=/usr/bin/mynode_gen_cert.sh specter 825
|
||||
#ExecStartPre=/usr/bin/mynode_pre_specter.sh
|
||||
ExecStartPre=/usr/bin/mynode_pre_specter.sh
|
||||
WorkingDirectory=/opt/mynode/specter
|
||||
|
||||
ExecStart=/opt/mynode/specter/env/bin/python3 -m cryptoadvance.specter server --host 0.0.0.0 --cert=/mnt/hdd/mynode/settings/specter/myNode.local.crt --key=/mnt/hdd/mynode/settings/specter/myNode.local.key
|
||||
|
|
9
rootfs/standard/usr/bin/mynode_pre_specter.sh
Executable file
9
rootfs/standard/usr/bin/mynode_pre_specter.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
source /usr/share/mynode/mynode_config.sh
|
||||
|
||||
set -x
|
||||
|
||||
if [ ! -f /mnt/hdd/mynode/specter/config.json ]; then
|
||||
cp -f /usr/share/mynode/specter.conf /mnt/hdd/mynode/specter/config.json
|
||||
fi
|
|
@ -421,22 +421,7 @@ if [ ! -L /home/bitcoin/.specter ]; then
|
|||
# Setup symlink to HDD
|
||||
sudo -u bitcoin ln -s /mnt/hdd/mynode/specter /home/bitcoin/.specter
|
||||
fi
|
||||
if [ -f /mnt/hdd/mynode/specter/config.json ]; then
|
||||
# Setup config file to point to local bitcoin instance
|
||||
BTCRPCPW=$(cat /mnt/hdd/mynode/settings/.btcrpcpw)
|
||||
|
||||
# Update Specter Settings
|
||||
set +e
|
||||
# cat /mnt/hdd/mynode/specter/config.json | jq '.rpc.datadir = "/home/bitcoin/.bitcoin"' > /mnt/hdd/mynode/specter/config_temp.json
|
||||
# cp -f /mnt/hdd/mynode/specter/config_temp.json /mnt/hdd/mynode/specter/config.json
|
||||
cat /mnt/hdd/mynode/specter/config.json | jq '.rpc.user = "mynode"' > /mnt/hdd/mynode/specter/config_temp.json
|
||||
cp -f /mnt/hdd/mynode/specter/config_temp.json /mnt/hdd/mynode/specter/config.json
|
||||
cat /mnt/hdd/mynode/specter/config.json | jq ".rpc.password = \"$BTCRPCPW\"" > /mnt/hdd/mynode/specter/config_temp.json
|
||||
cp -f /mnt/hdd/mynode/specter/config_temp.json /mnt/hdd/mynode/specter/config.json
|
||||
cat /mnt/hdd/mynode/specter/config.json | jq '.rpc.port = "8332"' > /mnt/hdd/mynode/specter/config_temp.json
|
||||
cp -f /mnt/hdd/mynode/specter/config_temp.json /mnt/hdd/mynode/specter/config.json
|
||||
set -e
|
||||
fi
|
||||
|
||||
# Setup Thunderhub
|
||||
mkdir -p /mnt/hdd/mynode/thunderhub/
|
||||
|
|
12
rootfs/standard/usr/share/mynode/specter.conf
Normal file
12
rootfs/standard/usr/share/mynode/specter.conf
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"rpc": {
|
||||
"autodetect": true,
|
||||
"datadir": "/home/bitcoin/.bitcoin",
|
||||
"user": "mynode",
|
||||
"password": "",
|
||||
"port": "8332",
|
||||
"host": "localhost",
|
||||
"protocol": "http",
|
||||
"external_node": true
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user