mynode/rootfs/standard/usr/bin/pre_lnd.sh
2021-03-30 22:09:55 -05:00

14 lines
458 B
Bash
Executable File

#!/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
fi
if [ ! -f /mnt/hdd/mynode/settings/.litpw ]; then
< /dev/urandom tr -dc A-Za-z0-9 | head -c${1:-12} > /mnt/hdd/mynode/settings/.litpw
chmod 600 /mnt/hdd/mynode/settings/.litpw
fi
exit 0