mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-26 19:47:05 +02:00
use /var/cache/raspiblitz for temp conf files creation
This commit is contained in:
@@ -226,9 +226,9 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
|||||||
RPC_USER=$(sudo cat /mnt/hdd/${network}/${network}.conf | grep rpcuser | cut -c 9-)
|
RPC_USER=$(sudo cat /mnt/hdd/${network}/${network}.conf | grep rpcuser | cut -c 9-)
|
||||||
PASSWORD_B=$(sudo cat /mnt/hdd/${network}/${network}.conf | grep rpcpassword | cut -c 13-)
|
PASSWORD_B=$(sudo cat /mnt/hdd/${network}/${network}.conf | grep rpcpassword | cut -c 13-)
|
||||||
|
|
||||||
sudo touch /home/admin/btc-rpc-explorer.env
|
sudo touch /var/cache/raspiblitz/btc-rpc-explorer.env
|
||||||
sudo chmod 600 /home/admin/btc-rpc-explorer.env || exit 1
|
sudo chmod 600 /var/cache/raspiblitz/btc-rpc-explorer.env || exit 1
|
||||||
sudo cat > /home/admin/btc-rpc-explorer.env <<EOF
|
sudo cat > /var/cache/raspiblitz/btc-rpc-explorer.env <<EOF
|
||||||
# Host/Port to bind to
|
# Host/Port to bind to
|
||||||
# Defaults: shown
|
# Defaults: shown
|
||||||
BTCEXP_HOST=0.0.0.0
|
BTCEXP_HOST=0.0.0.0
|
||||||
@@ -261,7 +261,7 @@ BTCEXP_ADDRESS_API=none
|
|||||||
BTCEXP_ELECTRUMX_SERVERS=tcp://127.0.0.1:50001
|
BTCEXP_ELECTRUMX_SERVERS=tcp://127.0.0.1:50001
|
||||||
EOF
|
EOF
|
||||||
sudo -u btcrpcexplorer mkdir /home/btcrpcexplorer/.config
|
sudo -u btcrpcexplorer mkdir /home/btcrpcexplorer/.config
|
||||||
sudo mv /home/admin/btc-rpc-explorer.env /home/btcrpcexplorer/.config/btc-rpc-explorer.env
|
sudo mv /var/cache/raspiblitz/btc-rpc-explorer.env /home/btcrpcexplorer/.config/btc-rpc-explorer.env
|
||||||
sudo chown btcrpcexplorer:btcrpcexplorer /home/btcrpcexplorer/.config/btc-rpc-explorer.env
|
sudo chown btcrpcexplorer:btcrpcexplorer /home/btcrpcexplorer/.config/btc-rpc-explorer.env
|
||||||
|
|
||||||
# open firewall
|
# open firewall
|
||||||
@@ -292,7 +292,7 @@ EOF
|
|||||||
|
|
||||||
# install service
|
# install service
|
||||||
echo "*** Install btc-rpc-explorer systemd ***"
|
echo "*** Install btc-rpc-explorer systemd ***"
|
||||||
cat > /home/admin/btc-rpc-explorer.service <<EOF
|
sudo cat > /var/cache/raspiblitz/btc-rpc-explorer.service <<EOF
|
||||||
# systemd unit for BTC RPC Explorer
|
# systemd unit for BTC RPC Explorer
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
@@ -319,7 +319,7 @@ PrivateDevices=true
|
|||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
sudo mv /home/admin/btc-rpc-explorer.service /etc/systemd/system/btc-rpc-explorer.service
|
sudo mv /var/cache/raspiblitz/btc-rpc-explorer.service /etc/systemd/system/btc-rpc-explorer.service
|
||||||
sudo systemctl enable btc-rpc-explorer
|
sudo systemctl enable btc-rpc-explorer
|
||||||
echo "# OK - the BTC-RPC-explorer service is now enabled"
|
echo "# OK - the BTC-RPC-explorer service is now enabled"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user