|
@ -126,11 +126,12 @@ def main(): |
|
|
''' |
|
|
''' |
|
|
Setup secrets, db, bitcoin, nginx, and lnd directory.. as a new install |
|
|
Setup secrets, db, bitcoin, nginx, and lnd directory.. as a new install |
|
|
''' |
|
|
''' |
|
|
print('Setup secrets, db, bitcoin, nginx, and lnd directory.. as a new install') |
|
|
print('Setup secrets, db, bitcoin, nginx, tor and lnd directory.. as a new install') |
|
|
os.system('/bin/cp -fr ' + homedirpath + '/secrets /mnt/data') |
|
|
os.system('/bin/cp -fr ' + homedirpath + '/secrets /mnt/data') |
|
|
os.system('/bin/cp -fr ' + homedirpath + '/db /mnt/data') |
|
|
os.system('/bin/cp -fr ' + homedirpath + '/db /mnt/data') |
|
|
os.system('/bin/cp -fr ' + homedirpath + '/bitcoin /mnt/data') |
|
|
os.system('/bin/cp -fr ' + homedirpath + '/bitcoin /mnt/data') |
|
|
os.system('/bin/cp -fr ' + homedirpath + '/lnd /mnt/data') |
|
|
os.system('/bin/cp -fr ' + homedirpath + '/lnd /mnt/data') |
|
|
|
|
|
os.system('/bin/cp -fr ' + homedirpath + '/tor /mnt/data') |
|
|
os.system('/bin/cp -fr ' + homedirpath + '/nginx /mnt/data') |
|
|
os.system('/bin/cp -fr ' + homedirpath + '/nginx /mnt/data') |
|
|
|
|
|
|
|
|
if not os.path.exists('/mnt/data/swap'): |
|
|
if not os.path.exists('/mnt/data/swap'): |
|
@ -153,12 +154,18 @@ def main(): |
|
|
- db |
|
|
- db |
|
|
- lnd |
|
|
- lnd |
|
|
- nginx |
|
|
- nginx |
|
|
|
|
|
- tor |
|
|
''' |
|
|
''' |
|
|
# Secrets folder |
|
|
# Secrets folder |
|
|
if not os.path.exists('/mnt/data/secrets'): |
|
|
if not os.path.exists('/mnt/data/secrets'): |
|
|
print('secrets folder does\'nt exist!') |
|
|
print('secrets folder does\'nt exist!') |
|
|
os.system('/bin/cp -fr ' + homedirpath + '/secrets /mnt/data') |
|
|
os.system('/bin/cp -fr ' + homedirpath + '/secrets /mnt/data') |
|
|
|
|
|
|
|
|
|
|
|
# tor folder |
|
|
|
|
|
if not os.path.exists('/mnt/data/tor'): |
|
|
|
|
|
print('secrets folder does\'nt exist!') |
|
|
|
|
|
os.system('/bin/cp -fr ' + homedirpath + '/tor /mnt/data') |
|
|
|
|
|
|
|
|
# db folder |
|
|
# db folder |
|
|
if not os.path.exists('/mnt/data/db'): |
|
|
if not os.path.exists('/mnt/data/db'): |
|
|
print('db folder does\'nt exist!') |
|
|
print('db folder does\'nt exist!') |
|
@ -206,12 +213,14 @@ def main(): |
|
|
os.system('/bin/rm -fr ' + homedirpath + '/db') |
|
|
os.system('/bin/rm -fr ' + homedirpath + '/db') |
|
|
os.system('/bin/rm -fr ' + homedirpath + '/bitcoin') |
|
|
os.system('/bin/rm -fr ' + homedirpath + '/bitcoin') |
|
|
os.system('/bin/rm -fr ' + homedirpath + '/lnd') |
|
|
os.system('/bin/rm -fr ' + homedirpath + '/lnd') |
|
|
|
|
|
os.system('/bin/rm -fr ' + homedirpath + '/tor') |
|
|
os.system('/bin/rm -fr ' + homedirpath + '/nginx') |
|
|
os.system('/bin/rm -fr ' + homedirpath + '/nginx') |
|
|
print('Set up symlinks') |
|
|
print('Set up symlinks') |
|
|
os.system('/bin/ln -s /mnt/data/secrets ' + homedirpath + '/secrets') |
|
|
os.system('/bin/ln -s /mnt/data/secrets ' + homedirpath + '/secrets') |
|
|
os.system('/bin/ln -s /mnt/data/db ' + homedirpath + '/db') |
|
|
os.system('/bin/ln -s /mnt/data/db ' + homedirpath + '/db') |
|
|
os.system('/bin/ln -s /mnt/data/bitcoin ' + homedirpath + '/bitcoin') |
|
|
os.system('/bin/ln -s /mnt/data/bitcoin ' + homedirpath + '/bitcoin') |
|
|
os.system('/bin/ln -s /mnt/data/lnd ' + homedirpath + '/lnd') |
|
|
os.system('/bin/ln -s /mnt/data/lnd ' + homedirpath + '/lnd') |
|
|
|
|
|
os.system('/bin/ln -s /mnt/data/tor ' + homedirpath + '/tor') |
|
|
os.system('/bin/ln -s /mnt/data/nginx ' + homedirpath + '/nginx') |
|
|
os.system('/bin/ln -s /mnt/data/nginx ' + homedirpath + '/nginx') |
|
|
else: |
|
|
else: |
|
|
print('No drives or unexpected number of drives detected!') |
|
|
print('No drives or unexpected number of drives detected!') |
|
|