Browse Source

fix hostname storage

dev
rootzoll 6 years ago
parent
commit
f979264f0b
  1. 6
      home.admin/20setupDialog.sh

6
home.admin/20setupDialog.sh

@ -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

Loading…
Cancel
Save