* #4577 make sure base directory exists
* #4780 adding qrencode to sd card build
* #4982 enforce logrotate
* #4982 new logrotate script
* #4946 doule logs lines for Blitz API
* #4869 move forcing locales
This commit is contained in:
/rootzoll
2025-05-18 14:21:57 +02:00
committed by GitHub
parent 50a1115a8b
commit 6973fbb48f
5 changed files with 17 additions and 16 deletions

View File

@@ -342,6 +342,15 @@ if [ ${isDebianInHosts} -eq 0 ]; then
fi
fi
# force locale - see #4861
# next major release should make sure to be set during sd build card
echo
echo "*** Forcing locales ..."
sudo sed -i '/^en_US.UTF-8/s/^#//' /etc/locale.gen
sudo sed -i '/^en_GB.UTF-8/s/^/#/' /etc/locale.gen
sudo locale-gen
echo -e "LANG=en_US.UTF-8\nLANGUAGE=en_US.UTF-8\nLC_ALL=en_US.UTF-8" | sudo tee /etc/default/locale > /dev/null
echo "*** Remove unnecessary packages ***"
unnecessary_packages=(libreoffice* oracle-java* chromium-browser nuscratch scratch sonic-pi plymouth python2 vlc* cups* libcups* libcamera* firefox* ffmpeg libpostproc* eom* evince*)
for pkg in "${unnecessary_packages[@]}"; do
@@ -392,7 +401,7 @@ echo -e "\n*** SOFTWARE UPDATE ***"
# sqlite3 -> database
# fdisk -> create partitions
# lsb-release -> needed to know which distro version we're running to add APT sources
general_utils="sudo policykit-1 htop git curl bash-completion vim jq dphys-swapfile bsdmainutils autossh telnet vnstat parted dosfstools fbi sysbench build-essential dialog bc python3-dialog unzip whois fdisk lsb-release smartmontools rsyslog"
general_utils="sudo policykit-1 htop git curl bash-completion vim jq dphys-swapfile bsdmainutils autossh telnet vnstat parted dosfstools fbi sysbench build-essential dialog bc python3-dialog unzip whois fdisk lsb-release smartmontools rsyslog qrencode"
# add btrfs-progs if not bookworm on aarch64
[ "${architecture}" = "aarch64" ] && ! grep "12 (bookworm)" < /etc/os-release && general_utils="${general_utils} btrfs-progs"
# python3-mako --> https://github.com/rootzoll/raspiblitz/issues/3441

View File

@@ -258,8 +258,8 @@ else
echo
echo "*** LAST BLITZAPI LOGS ***"
echo "sudo journalctl -u blitzapi -b --no-pager -n20"
sudo journalctl -u blitzapi -b --no-pager -n20
echo "sudo journalctl -u blitzapi -b --no-pager -n40"
sudo journalctl -u blitzapi -b --no-pager -n40
echo
fi

View File

@@ -100,15 +100,6 @@ sudo systemctl disable ssh
sudo rm /etc/ssh/ssh_host_*
echo "OK"
# force locale - see #4861
# next major release should make sure to be set during sd build card
echo
echo "Forcing locales ..."
sudo sed -i '/^en_US.UTF-8/s/^#//' /etc/locale.gen
sudo sed -i '/^en_GB.UTF-8/s/^/#/' /etc/locale.gen
sudo locale-gen
echo -e "LANG=en_US.UTF-8\nLANGUAGE=en_US.UTF-8\nLC_ALL=en_US.UTF-8" | sudo tee /etc/default/locale > /dev/null
# make sure file system is clean and ready for release
echo
echo "fsck on first boot ..."

View File

@@ -415,6 +415,7 @@ alias ${netprefix}lndconf=\"sudo nano /mnt/hdd/app-data/lnd/${netprefix}lnd.conf
# if parameter "initwallet" was set and wallet does not exist yet
walletExists=$(sudo ls /mnt/hdd/app-data/lnd/data/chain/${network}/${CHAIN}/wallet.db 2>/dev/null | grep -c "wallet.db")
echo "# initwallet(${initwallet}) walletExists(${walletExists})"
if [ "${initwallet}" == "1" ] && [ "${walletExists}" == "0" ]; then
# only ask on mainnet for passwordC - for the testnet/signet its default 'raspiblitz'
if [ "${CHAIN}" == "mainnet" ]; then
@@ -433,6 +434,7 @@ alias ${netprefix}lndconf=\"sudo nano /mnt/hdd/app-data/lnd/${netprefix}lnd.conf
echo "# press ENTER to continue"
read key
else
sudo mkdir -p /mnt/hdd/app-data/lnd/data/chain/${network}/${CHAIN}
seedFile="/mnt/hdd/app-data/lnd/data/chain/${network}/${CHAIN}/seedwords.info"
echo "seedwords='${seedwords}'" | sudo tee ${seedFile}
echo "seedwords6x4='${seedwords6x4}'" | sudo tee -a ${seedFile}

View File

@@ -136,8 +136,9 @@ case "$1" in
# add logrotate config for modified Tor dir on ext. disk
sudo tee /etc/logrotate.d/raspiblitz-tor >/dev/null <<EOF
/mnt/hdd/app-data/tor/*log {
su debian-tor debian-tor
size 100M
rotate 4
rotate 2
compress
delaycompress
missingok
@@ -145,9 +146,7 @@ case "$1" in
create 0640 debian-tor debian-tor
sharedscripts
postrotate
if invoke-rc.d tor status > /dev/null; then
invoke-rc.d tor reload > /dev/null
fi
systemctl reload tor >/dev/null 2>&1 || true
endscript
}
EOF