mynode/rootfs/standard/usr/bin/pre_lnd.sh

10 lines
271 B
Bash
Raw Normal View History

2019-06-15 23:02:44 +00:00
#!/bin/bash
# Make sure we have wallet pw
mkdir -p /mnt/hdd/mynode/settings
if [ ! -f /mnt/hdd/mynode/settings/.lndpw ]; then
< /dev/urandom tr -dc A-Za-z0-9 | head -c${1:-24} > /mnt/hdd/mynode/settings/.lndpw
chmod 600 /mnt/hdd/mynode/settings/.lndpw
2019-06-15 23:02:44 +00:00
fi
exit 0