Switch to bitcoin user for version verification (#4942)

We normally run bitcoind as user bitcoin.
Running it here as root could potentially at some point cause issues (e.g. if files are created and the ownership is then off).
This commit is contained in:
frennkie 2025-02-03 14:12:41 +01:00 committed by GitHub
parent 76267f812b
commit 142b5197fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -288,7 +288,7 @@ if [ "${mode}" = "tested" ] || [ "${mode}" = "reckless" ] || [ "${mode}" = "cust
tar -xvf ${binaryName}
sudo install -m 0755 -o root -g root -t /usr/local/bin/ bitcoin-${bitcoinVersion}/bin/*
sleep 3
if ! sudo /usr/local/bin/bitcoind --version | grep "${bitcoinVersion}"; then
if ! sudo -u bitcoin /usr/local/bin/bitcoind --version | grep "${bitcoinVersion}"; then
echo
echo "# BUILD FAILED --> Was not able to install bitcoind version(${bitcoinVersion})"
exit 1