mirror of
https://github.com/Retropex/raspiblitz.git
synced 2025-05-12 19:20:48 +02:00
parent
d37eebdd96
commit
7c91ee99a7
@ -35,17 +35,6 @@ elif [ -d /boot ]; then
|
|||||||
fi
|
fi
|
||||||
echo "# raspi_bootdir(${raspi_bootdir})"
|
echo "# raspi_bootdir(${raspi_bootdir})"
|
||||||
|
|
||||||
# install BTRFS if needed
|
|
||||||
btrfsInstalled=$(btrfs --version 2>/dev/null | grep -c "btrfs-progs")
|
|
||||||
if [ ${btrfsInstalled} -eq 0 ]; then
|
|
||||||
>&2 echo "# Installing BTRFS ..."
|
|
||||||
apt-get install -y btrfs-progs 1>/dev/null
|
|
||||||
fi
|
|
||||||
btrfsInstalled=$(btrfs --version 2>/dev/null | grep -c "btrfs-progs")
|
|
||||||
if [ ${btrfsInstalled} -eq 0 ]; then
|
|
||||||
echo "error='missing btrfs package'"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# install smartmontools if needed
|
# install smartmontools if needed
|
||||||
smartmontoolsInstalled=$(apt-cache policy smartmontools | grep -c 'Installed: (none)' | grep -c "0")
|
smartmontoolsInstalled=$(apt-cache policy smartmontools | grep -c 'Installed: (none)' | grep -c "0")
|
||||||
@ -66,14 +55,41 @@ fi
|
|||||||
# gathering system info
|
# gathering system info
|
||||||
# is global so that also other parts of this script can use this
|
# is global so that also other parts of this script can use this
|
||||||
|
|
||||||
|
# check if a btrfs filesystem is available
|
||||||
# basics
|
# basics
|
||||||
isMounted=$(df | grep -c /mnt/hdd)
|
isMounted=$(df | grep -c /mnt/hdd)
|
||||||
isBTRFS=$(btrfs filesystem show 2>/dev/null| grep -c 'BLITZSTORAGE')
|
isBTRFS="0"
|
||||||
isRaid=$(btrfs filesystem df /mnt/hdd 2>/dev/null | grep -c "Data, RAID1")
|
isRaid="0"
|
||||||
isZFS=$(zfs list 2>/dev/null | grep -c "/mnt/hdd")
|
isZFS="0"
|
||||||
isSSD="0"
|
isSSD="0"
|
||||||
isSMART="0"
|
isSMART="0"
|
||||||
|
|
||||||
|
# BTRFS extras
|
||||||
|
btrfsConnected=$(lsblk -f | grep -c btrfs)
|
||||||
|
if [ ${btrfsConnected} -gt 0 ]; then
|
||||||
|
|
||||||
|
# install BTRFS if needed
|
||||||
|
btrfsInstalled=$(btrfs --version 2>/dev/null | grep -c "btrfs-progs")
|
||||||
|
if [ ${btrfsInstalled} -eq 0 ]; then
|
||||||
|
>&2 echo "# Installing BTRFS ..."
|
||||||
|
apt-get install -y btrfs-progs 1>/dev/null
|
||||||
|
fi
|
||||||
|
btrfsInstalled=$(btrfs --version 2>/dev/null | grep -c "btrfs-progs")
|
||||||
|
if [ ${btrfsInstalled} -eq 0 ]; then
|
||||||
|
echo "error='missing btrfs package'"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
isBTRFS=$(btrfs filesystem show 2>/dev/null| grep -c 'BLITZSTORAGE')
|
||||||
|
isRaid=$(btrfs filesystem df /mnt/hdd 2>/dev/null | grep -c "Data, RAID1")
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ZFS extras
|
||||||
|
zfsConnected=$(lsblk -f | grep -c zfs)
|
||||||
|
if [ ${zfsConnected} -gt 0 ]; then
|
||||||
|
isZFS=$(zfs list 2>/dev/null | grep -c "/mnt/hdd")
|
||||||
|
fi
|
||||||
|
|
||||||
# determine if swap is external on or not
|
# determine if swap is external on or not
|
||||||
externalSwapPath="/mnt/hdd/swapfile"
|
externalSwapPath="/mnt/hdd/swapfile"
|
||||||
if [ ${isBTRFS} -eq 1 ]; then
|
if [ ${isBTRFS} -eq 1 ]; then
|
||||||
@ -656,6 +672,8 @@ if [ "$1" = "format" ]; then
|
|||||||
# check valid format
|
# check valid format
|
||||||
if [ "$2" = "btrfs" ]; then
|
if [ "$2" = "btrfs" ]; then
|
||||||
>&2 echo "# DATA DRIVE - FORMATTING to BTRFS layout (new)"
|
>&2 echo "# DATA DRIVE - FORMATTING to BTRFS layout (new)"
|
||||||
|
# check if btrfs-tools are installed
|
||||||
|
apt-get install -y btrfs-progs 1>/dev/null
|
||||||
elif [ "$2" = "ext4" ]; then
|
elif [ "$2" = "ext4" ]; then
|
||||||
>&2 echo "# DATA DRIVE - FORMATTING to EXT4 layout (old)"
|
>&2 echo "# DATA DRIVE - FORMATTING to EXT4 layout (old)"
|
||||||
else
|
else
|
||||||
|
@ -487,8 +487,8 @@ if [ "$1" = "install" ]; then
|
|||||||
echo "# Install NBXplorer $NBXplorerVersion"
|
echo "# Install NBXplorer $NBXplorerVersion"
|
||||||
cd /home/btcpay || exit 1
|
cd /home/btcpay || exit 1
|
||||||
echo "# Download the NBXplorer source code $NBXplorerVersion"
|
echo "# Download the NBXplorer source code $NBXplorerVersion"
|
||||||
sudo -u btcpay git clone https://github.com/dgarage/NBXplorer.git 2>/dev/null
|
sudo -u btcpay git clone https://github.com/dgarage/NBXplorer.git
|
||||||
cd NBXplorer || exit 1
|
cd NBXplorer
|
||||||
sudo -u btcpay git reset --hard $NBXplorerVersion
|
sudo -u btcpay git reset --hard $NBXplorerVersion
|
||||||
# PGP verify
|
# PGP verify
|
||||||
NBXPGPsigner="nicolasdorier"
|
NBXPGPsigner="nicolasdorier"
|
||||||
|
Loading…
Reference in New Issue
Block a user