loop: sync all macaroons and unix groups for access

This commit is contained in:
openoms 2020-08-24 14:44:38 +01:00
parent b6c24da1f2
commit e948e1470e
No known key found for this signature in database
GPG key ID: 5BFB77609B081B65
2 changed files with 13 additions and 1 deletions

View file

@ -66,6 +66,8 @@ if [ "${loop}" != "${choice}" ]; then
errorOnInstall=$?
if [ "${choice}" = "on" ]; then
if [ ${errorOnInstall} -eq 0 ]; then
# check macaroons and fix missing
/home/admin/config.scripts/lnd.credential.sh check
sudo systemctl start loopd
/home/admin/config.scripts/bonus.loop.sh menu
else

View file

@ -48,12 +48,22 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
# create symlink
sudo ln -s "/mnt/hdd/app-data/lnd/" "/home/loop/.lnd"
# sync all macaroons and unix groups for access
/home/admin/config.scripts/lnd.credentials.sh sync
# macaroons will be checked after install
# add user to group with admin access to lnd
sudo /usr/sbin/usermod --append --groups lndadmin loop
# add user to group with readonly access on lnd
sudo /usr/sbin/usermod --append --groups lndreadonly loop
# add user to group with invoice access on lnd
sudo /usr/sbin/usermod --append --groups lndinvoice loop
# add user to groups with all macaroons
sudo /usr/sbin/usermod --append --groups lndinvoices loop
sudo /usr/sbin/usermod --append --groups lndchainnotifier loop
sudo /usr/sbin/usermod --append --groups lndsigner loop
sudo /usr/sbin/usermod --append --groups lndwalletkit loop
sudo /usr/sbin/usermod --append --groups lndrouter loop
# install from source
cd /home/loop