ln-service icon indicating copy to clipboard operation
ln-service copied to clipboard

fs.existsSync() seems to fail on symlink (or relative path?)

Open pldelattre opened this issue 6 years ago • 4 comments

service fails with exception 'ExpectedTlsCert' (ln-service/lightning/lightning_daemon.js line 50) if i set

export LNSERVICE_LND_DIR='~/.lnd/'

However it starts without issue if I set

export LNSERVICE_LND_DIR='/home/pi/data/ext4/LightningData'

Knowing that my ~/.lnd/ is a symlink to /home/pi/data/ext4/LightningData

pi@raspberrypi:~/ln-service $ ls -l ~/.lnd lrwxrwxrwx 1 pi pi 33 May 22 11:44 /home/pi/.lnd -> /home/pi/data/ext4/LightningData/

Not sure to understand why.

pldelattre avatar May 23 '18 09:05 pldelattre

I didn’t test it with symlinks, possible it doesn’t support that in its check. Is it a real workaround to just use the direct path or that also causes problems?

alexbosworth avatar May 23 '18 13:05 alexbosworth

It is a real workaround.

On Wed 23 May 2018 at 15:52, Alex Bosworth [email protected] wrote:

I didn’t test it with symlinks, possible it doesn’t support that in its check. Is it a real workaround to just use the direct path or that also causes problems?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/alexbosworth/ln-service/issues/25#issuecomment-391354790, or mute the thread https://github.com/notifications/unsubscribe-auth/AS0TwPTKyG_-wVpb_7Pd8oCFm2vd8TU9ks5t1WmwgaJpZM4UKIVm .

pldelattre avatar May 23 '18 18:05 pldelattre

I experienced this also in linux (ubuntu 18.04).

litch avatar Jan 17 '19 01:01 litch

Just checked: existsSync works with symlinks and I verified the checks in local_lnd.js also work with a symlinked path as value for LNSERVICE_LND_DIR.

dennisreimann avatar Nov 29 '19 12:11 dennisreimann