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