mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-25 11:13:12 +02:00
fix bootstrap service
This commit is contained in:
@@ -8,22 +8,24 @@ logFile="/home/admin/raspiblitz.log"
|
||||
# used by display and later setup steps
|
||||
infoFile="/home/admin/raspiblitz.info"
|
||||
|
||||
echo "presync: waiting 2 secs" >> $logFile
|
||||
sleep 2
|
||||
#echo "presync: waiting 2 secs" >> $logFile
|
||||
#sleep 2
|
||||
|
||||
# just in case an old presync did not shutdown properly
|
||||
sudo systemctl stop bitcoind.service 2>/dev/null
|
||||
sudo systemctl disable bitcoind.service 2>/dev/null
|
||||
#sudo systemctl stop bitcoind.service 2>/dev/null
|
||||
#sudo systemctl disable bitcoind.service 2>/dev/null
|
||||
|
||||
echo "presync: copying files" >> $logFile
|
||||
sudo cp /home/admin/assets/bitcoin.conf /mnt/hdd/bitcoin/bitcoin.conf
|
||||
sudo cp /home/admin/assets/bitcoind.service /etc/systemd/system/bitcoind.service
|
||||
sudo chmod +x /etc/systemd/system/bitcoind.service
|
||||
sudo ln -s /mnt/hdd/bitcoin /home/bitcoin/.bitcoin
|
||||
echo "presync: starting services" >> $logFile
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable bitcoind.service
|
||||
sudo systemctl start bitcoind.service
|
||||
echo "presync: bitcoind" >> $logFile
|
||||
#sudo cp /home/admin/assets/bitcoin.conf /mnt/hdd/bitcoin/bitcoin.conf
|
||||
#sudo cp /home/admin/assets/bitcoind.service /etc/systemd/system/bitcoind.service
|
||||
#sudo chmod +x /etc/systemd/system/bitcoind.service
|
||||
#sudo ln -s /mnt/hdd/bitcoin /home/bitcoin/.bitcoin
|
||||
#echo "presync: starting services" >> $logFile
|
||||
#sudo systemctl daemon-reload
|
||||
#sudo systemctl enable bitcoind.service
|
||||
#sudo systemctl start bitcoind.service
|
||||
sudo chown -R bitcoin:bitcoin /mnt/hdd/bitcoin
|
||||
sudo -u bitcoin /usr/local/bin/bitcoind -daemon -conf=/home/admin/assets/bitcoin.conf -pid=/mnt/hdd/bitcoin/bitcoind.pid
|
||||
echo "presync: started" >> $logFile
|
||||
|
||||
# update info file
|
||||
|
@@ -22,4 +22,4 @@ maxmempool=50
|
||||
maxconnections=40
|
||||
maxuploadtarget=5000
|
||||
|
||||
datadir=/home/bitcoin/.bitcoin
|
||||
datadir=/mnt/hdd/bitcoin
|
||||
|
@@ -2,17 +2,16 @@
|
||||
# /etc/systemd/system/bootstrap.service
|
||||
|
||||
[Unit]
|
||||
Description=execute on every startup before everything else is starting
|
||||
Description=execute on every startup before everything else
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
Group=root
|
||||
Type=oneshot
|
||||
RemainAfterExit=true
|
||||
ExecStart=/home/admin/_bootstrap.sh
|
||||
KillMode=process
|
||||
StandardOutput=journal
|
||||
Restart=no
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@@ -26,4 +26,4 @@ maxuploadtarget=5000
|
||||
discardfee=0.00000001
|
||||
mintxfee=0.00000001
|
||||
minrelaytxfee=0.00000001
|
||||
datadir=/home/bitcoin/.litecoin
|
||||
datadir=/mnt/hdd/litecoin
|
||||
|
Reference in New Issue
Block a user