2019-06-15 23:02:44 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Make sure we have wallet pw
|
2019-07-06 01:45:42 +00:00
|
|
|
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
|
2021-03-31 03:09:55 +00:00
|
|
|
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
|
2019-06-15 23:02:44 +00:00
|
|
|
|
|
|
|
exit 0
|