mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-11-19 02:22:24 +01:00
fix hostname storage
This commit is contained in:
@@ -22,11 +22,11 @@ sed -i "s/^alias=.*/alias=${result}/g" /home/admin/assets/lnd.${network}.conf
|
|||||||
# work around - because without a reboot the hostname seems not updates in the whole system
|
# work around - because without a reboot the hostname seems not updates in the whole system
|
||||||
valueExistsInInfoFile=$(sudo cat /home/admin/raspiblitz.info | grep -c "hostname=")
|
valueExistsInInfoFile=$(sudo cat /home/admin/raspiblitz.info | grep -c "hostname=")
|
||||||
if [ ${valueExistsInInfoFile} -eq 0 ]; then
|
if [ ${valueExistsInInfoFile} -eq 0 ]; then
|
||||||
# update
|
|
||||||
sed -i "s/^hostname=.*/hostname=${result}/g" /home/admin/raspiblitz.info
|
|
||||||
else
|
|
||||||
# add
|
# add
|
||||||
echo "hostname=${result}" >> /home/admin/raspiblitz.info
|
echo "hostname=${result}" >> /home/admin/raspiblitz.info
|
||||||
|
else
|
||||||
|
# update
|
||||||
|
sed -i "s/^hostname=.*/hostname=${result}/g" /home/admin/raspiblitz.info
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user