Compare commits
734 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c73c5f022a | ||
![]() |
336a3418e9 | ||
![]() |
27bdcb072c | ||
![]() |
3c71712653 | ||
![]() |
ed675f628d | ||
![]() |
62a34a6105 | ||
![]() |
0f1b1fc433 | ||
![]() |
0134325bfe | ||
![]() |
d2bcb4c34a | ||
![]() |
1e5ea5ff6f | ||
![]() |
1183448f4f | ||
![]() |
cd424ac955 | ||
![]() |
e7bb32a485 | ||
![]() |
d9b091be1a | ||
![]() |
4d4385a840 | ||
![]() |
a68069d3ee | ||
![]() |
544e49ecf8 | ||
![]() |
9f7c479b0d | ||
![]() |
eaeb96ae14 | ||
![]() |
2058903689 | ||
![]() |
40e970d828 | ||
![]() |
9a2de6cad5 | ||
![]() |
b6c8bc17da | ||
![]() |
8a16a8ffe0 | ||
![]() |
22a95cae08 | ||
![]() |
e4c51fe22e | ||
![]() |
c5c984f3e5 | ||
![]() |
13acbe94b0 | ||
![]() |
88168842dc | ||
![]() |
5e732ce67f | ||
![]() |
d746bf3353 | ||
![]() |
b4e38e8741 | ||
![]() |
e74b129f22 | ||
![]() |
0516aa5971 | ||
![]() |
20650fd3e7 | ||
![]() |
36b38d5118 | ||
![]() |
513c759e5c | ||
![]() |
8e6e92b37c | ||
![]() |
0df22b0504 | ||
![]() |
4388da4859 | ||
![]() |
500e26d500 | ||
![]() |
0351d2fb5e | ||
![]() |
1cdfc3e6f6 | ||
![]() |
af85242be5 | ||
![]() |
28bde64e9a | ||
![]() |
770587eee2 | ||
![]() |
d1e57d6bd2 | ||
![]() |
d21348822c | ||
![]() |
c0d07013fc | ||
![]() |
4932495daa | ||
![]() |
45dbdb3b82 | ||
![]() |
4f7ce2b8a7 | ||
![]() |
3de15bed49 | ||
![]() |
bd5f010409 | ||
![]() |
d423c3c2d9 | ||
![]() |
9ff4947021 | ||
![]() |
e174972fe2 | ||
![]() |
8c8b0b2c62 | ||
![]() |
b419daf43a | ||
![]() |
bf9dbc0321 | ||
![]() |
e63326bbea | ||
![]() |
5209508584 | ||
![]() |
425442c248 | ||
![]() |
b6c919a0e8 | ||
![]() |
58d568685e | ||
![]() |
c891c1df7e | ||
![]() |
4d9a4e4dc4 | ||
![]() |
208cd6ab4e | ||
![]() |
c8e555c9b3 | ||
![]() |
e4761966f3 | ||
![]() |
2eed08965c | ||
![]() |
f9ae449ebb | ||
![]() |
c2c710a9d1 | ||
![]() |
4d4762106e | ||
![]() |
3aa0bb42a7 | ||
![]() |
ce80eb5939 | ||
![]() |
8f7f08cea9 | ||
![]() |
81a2a013c8 | ||
![]() |
f0ccc61b05 | ||
![]() |
7eaf68cd41 | ||
![]() |
c8feef9063 | ||
![]() |
c7eb225de4 | ||
![]() |
35b5e8e670 | ||
![]() |
69a18c7375 | ||
![]() |
8b77877d6b | ||
![]() |
6558fb41f1 | ||
![]() |
3b60da7cd4 | ||
![]() |
4325658924 | ||
![]() |
01d3595a83 | ||
![]() |
dd8b195db9 | ||
![]() |
dc5999a3c7 | ||
![]() |
ac9735b8d3 | ||
![]() |
836990aaca | ||
![]() |
c4b8ef5586 | ||
![]() |
5c8d1da6e5 | ||
![]() |
b377858178 | ||
![]() |
ba88e6e17c | ||
![]() |
069005cc29 | ||
![]() |
b34186ff0c | ||
![]() |
6d9e0ae5f5 | ||
![]() |
fa9989bf51 | ||
![]() |
15447780fa | ||
![]() |
f26489d653 | ||
![]() |
655f5cb7b0 | ||
![]() |
45f5539f9c | ||
![]() |
58e7bcd260 | ||
![]() |
19c64497ef | ||
![]() |
5022cfaf37 | ||
![]() |
502782f5ed | ||
![]() |
f8a7af1970 | ||
![]() |
a3b4daba4e | ||
![]() |
da34292f10 | ||
![]() |
870014d879 | ||
![]() |
1093ae3f9b | ||
![]() |
16cbf0ef34 | ||
![]() |
898485adbe | ||
![]() |
7d41e56e02 | ||
![]() |
4ecd33514c | ||
![]() |
e2d9d29164 | ||
![]() |
b7a8731e9c | ||
![]() |
02a5771666 | ||
![]() |
151ba3e15e | ||
![]() |
f4a4800174 | ||
![]() |
0ebc94821d | ||
![]() |
483ca2305b | ||
![]() |
01db973bec | ||
![]() |
01d289cb4f | ||
![]() |
27ff2d63e2 | ||
![]() |
02fca137b3 | ||
![]() |
850f08d37f | ||
![]() |
e4cf6d294a | ||
![]() |
0bb32723e8 | ||
![]() |
a791651366 | ||
![]() |
0e26641158 | ||
![]() |
ff23ede250 | ||
![]() |
e15a02caf1 | ||
![]() |
5d2b4c84fc | ||
![]() |
1b01d920db | ||
![]() |
5e461ff1ce | ||
![]() |
2c56f5248b | ||
![]() |
24a3c06a35 | ||
![]() |
f1342ebcfd | ||
![]() |
588820ff13 | ||
![]() |
9e64abc9d9 | ||
![]() |
7426a3a287 | ||
![]() |
5581a40b2b | ||
![]() |
6a4b33a960 | ||
![]() |
2d701b77e2 | ||
![]() |
77c45141bc | ||
![]() |
ac377df504 | ||
![]() |
083cd12727 | ||
![]() |
14e1201d82 | ||
![]() |
e477377214 | ||
![]() |
522b13e5d4 | ||
![]() |
b3c1a8d937 | ||
![]() |
6918d21639 | ||
![]() |
b4e3a61fe4 | ||
![]() |
0720b0c2a8 | ||
![]() |
0592776504 | ||
![]() |
2f0abcf7fa | ||
![]() |
2de42dc72a | ||
![]() |
87d63e5f32 | ||
![]() |
c5fedf71c2 | ||
![]() |
b02db0b46c | ||
![]() |
003230d137 | ||
![]() |
e70c6863f9 | ||
![]() |
2b70db09fe | ||
![]() |
9283f7fc3d | ||
![]() |
11c2072580 | ||
![]() |
45c5c0ff57 | ||
![]() |
440b788bd5 | ||
![]() |
ec67c362f7 | ||
![]() |
5e283e0cc5 | ||
![]() |
85e6e26f9d | ||
![]() |
b3a14cfc35 | ||
![]() |
85871f325a | ||
![]() |
ffea31dfd6 | ||
![]() |
7cd267c421 | ||
![]() |
449b0a226c | ||
![]() |
be1ec81a58 | ||
![]() |
13ae51c54a | ||
![]() |
1a092f8ee7 | ||
![]() |
26d5e18e7d | ||
![]() |
6d4784bba8 | ||
![]() |
f9cb44982e | ||
![]() |
f67c8fd11c | ||
![]() |
168789c609 | ||
![]() |
e70f4b7197 | ||
![]() |
81e5fae6dc | ||
![]() |
e98bb8d3c0 | ||
![]() |
4719fbd443 | ||
![]() |
2f967e9077 | ||
![]() |
240f28d5dc | ||
![]() |
96bb62a010 | ||
![]() |
81ebfb7902 | ||
![]() |
60c58ec6df | ||
![]() |
6fdf6f747e | ||
![]() |
0635a16d2b | ||
![]() |
91cddd9fb0 | ||
![]() |
970b4dfb5d | ||
![]() |
c2df07efd1 | ||
![]() |
1d3d7a0e75 | ||
![]() |
9afa8101b4 | ||
![]() |
0a215c2476 | ||
![]() |
5f33c94f09 | ||
![]() |
51e1bf4452 | ||
![]() |
c0ab542310 | ||
![]() |
ca88646ad2 | ||
![]() |
3f3b7e429e | ||
![]() |
af65af5e14 | ||
![]() |
ce89ac53fa | ||
![]() |
ccd08a08d1 | ||
![]() |
e6bec47aec | ||
![]() |
186d50dec3 | ||
![]() |
b5c03d509d | ||
![]() |
5321480fb5 | ||
![]() |
00fe2e2c67 | ||
![]() |
4d8776a35c | ||
![]() |
a7ae5162e7 | ||
![]() |
98dfd49f6e | ||
![]() |
eddec30f4a | ||
![]() |
e70263dc30 | ||
![]() |
64e8b706ad | ||
![]() |
5062bfe95a | ||
![]() |
de18ad8b36 | ||
![]() |
1404ac3285 | ||
![]() |
622135c570 | ||
![]() |
40587e4d8e | ||
![]() |
c290205fb9 | ||
![]() |
127d88efcc | ||
![]() |
fac733a0a1 | ||
![]() |
4de59b58b3 | ||
![]() |
1ef72dc481 | ||
![]() |
07cdde07c0 | ||
![]() |
a015d2c399 | ||
![]() |
0a9ce40ff9 | ||
![]() |
275f996226 | ||
![]() |
9bb38ce501 | ||
![]() |
d206bc238d | ||
![]() |
c17066cb07 | ||
![]() |
30d2e69304 | ||
![]() |
d73191099a | ||
![]() |
3f837a2fc2 | ||
![]() |
487ccd45b4 | ||
![]() |
f2d09038d5 | ||
![]() |
252de3b0d4 | ||
![]() |
c8d49b71cb | ||
![]() |
72af1378e4 | ||
![]() |
dee7ec41f5 | ||
![]() |
432a0c720e | ||
![]() |
720771709f | ||
![]() |
16b3afe0ab | ||
![]() |
2896fa398a | ||
![]() |
50769843ba | ||
![]() |
2995282d49 | ||
![]() |
39a94dd4d4 | ||
![]() |
6324c5f97b | ||
![]() |
7e66b82e0e | ||
![]() |
4523db7036 | ||
![]() |
b402ee4c5f | ||
![]() |
6a33cbc6dc | ||
![]() |
16094398d7 | ||
![]() |
9f238868e9 | ||
![]() |
37c8f6f897 | ||
![]() |
624f8ca1a7 | ||
![]() |
df210e6e45 | ||
![]() |
b57aba6acf | ||
![]() |
7a7c7bd97b | ||
![]() |
4f71a73e3f | ||
![]() |
041574a1ee | ||
![]() |
3ca368fbbe | ||
![]() |
c67499b222 | ||
![]() |
5f1df69528 | ||
![]() |
1781062bfe | ||
![]() |
68f21035c1 | ||
![]() |
885be6ccb2 | ||
![]() |
5a2257c445 | ||
![]() |
ee3cc02864 | ||
![]() |
bf9aaa9076 | ||
![]() |
154db3ea90 | ||
![]() |
4a194007a8 | ||
![]() |
60b5c47240 | ||
![]() |
d59d03ce27 | ||
![]() |
eb1969d267 | ||
![]() |
b8e42f062f | ||
![]() |
e97b35a3b0 | ||
![]() |
a9f9272388 | ||
![]() |
a3c2ef9b6e | ||
![]() |
a925528657 | ||
![]() |
850d90b416 | ||
![]() |
93e8b5aa14 | ||
![]() |
2c235f3b53 | ||
![]() |
ea41275b5d | ||
![]() |
d033e5a7cf | ||
![]() |
a394ba59a3 | ||
![]() |
547e0456a9 | ||
![]() |
6163c91cd6 | ||
![]() |
672f980335 | ||
![]() |
a6a15dc834 | ||
![]() |
39102b149c | ||
![]() |
e670e61297 | ||
![]() |
d3fd958c4c | ||
![]() |
0b1e6fb9ac | ||
![]() |
e3982b9175 | ||
![]() |
01560a95b1 | ||
![]() |
882d99a6ec | ||
![]() |
67af23321c | ||
![]() |
ea17380591 | ||
![]() |
7070df161c | ||
![]() |
196199e662 | ||
![]() |
950b18b8a1 | ||
![]() |
bd9c177c4e | ||
![]() |
837f8883a2 | ||
![]() |
73038b4b33 | ||
![]() |
0f98f2f55b | ||
![]() |
7c6ef5dba7 | ||
![]() |
56fd14c5fa | ||
![]() |
70eae57b03 | ||
![]() |
43ee57d069 | ||
![]() |
e33800c8e6 | ||
![]() |
fc845973cc | ||
![]() |
901bfb2a3f | ||
![]() |
16b815e58d | ||
![]() |
6134cac0ab | ||
![]() |
f090d605dc | ||
![]() |
e3182203f2 | ||
![]() |
e318fea70f | ||
![]() |
8119b33f3a | ||
![]() |
2b414703cf | ||
![]() |
accea759f6 | ||
![]() |
8828075637 | ||
![]() |
684322e1e2 | ||
![]() |
ef47911beb | ||
![]() |
64e5f65eab | ||
![]() |
329e4a83e9 | ||
![]() |
2551abf9ca | ||
![]() |
d459b8d828 | ||
![]() |
81e8c219ef | ||
![]() |
a7c2a2de16 | ||
![]() |
cb7c97d49b | ||
![]() |
010103a3e3 | ||
![]() |
d0e5d90bbb | ||
![]() |
3274a0b5bc | ||
![]() |
64964d7888 | ||
![]() |
d7e0874c8c | ||
![]() |
91e6623579 | ||
![]() |
f396e2781e | ||
![]() |
d2742b1d62 | ||
![]() |
0ede78d0af | ||
![]() |
742da1b9d7 | ||
![]() |
1355a2b4a2 | ||
![]() |
91ba149d98 | ||
![]() |
fe0e1e518e | ||
![]() |
4e889be7d8 | ||
![]() |
f58a388cdb | ||
![]() |
9bfc8237e0 | ||
![]() |
0d0e5581a5 | ||
![]() |
7dfdcf9b3f | ||
![]() |
3b22b7a100 | ||
![]() |
4444bd191c | ||
![]() |
bfc29736a5 | ||
![]() |
1da893ed06 | ||
![]() |
df662a1349 | ||
![]() |
8c87bee0f6 | ||
![]() |
237570af44 | ||
![]() |
0a2ce9a95a | ||
![]() |
b20fae09d6 | ||
![]() |
2abe5aed4b | ||
![]() |
8bbdd957fb | ||
![]() |
f5302c7409 | ||
![]() |
6d1582096d | ||
![]() |
819c7e72f6 | ||
![]() |
9878ea8a02 | ||
![]() |
50fbeb0168 | ||
![]() |
68678e243d | ||
![]() |
3db93fa19b | ||
![]() |
68772e3f6d | ||
![]() |
14f126ee88 | ||
![]() |
82bd29c2d0 | ||
![]() |
e7b1772f3b | ||
![]() |
fc2979f9da | ||
![]() |
c9b6971489 | ||
![]() |
d270662b73 | ||
![]() |
120d407d38 | ||
![]() |
6965b6ceae | ||
![]() |
8d72c83ca9 | ||
![]() |
5d346e9062 | ||
![]() |
45744386d7 | ||
![]() |
ff7275faf8 | ||
![]() |
1bca7b6d88 | ||
![]() |
afc1d348e0 | ||
![]() |
c4c0dbcad5 | ||
![]() |
9ba52edba9 | ||
![]() |
94126c5280 | ||
![]() |
7e446517fb | ||
![]() |
5b984b82ff | ||
![]() |
04a045ba48 | ||
![]() |
50064448b3 | ||
![]() |
0cd4c8a8fe | ||
![]() |
9752773caa | ||
![]() |
7a195c8eac | ||
![]() |
d9cfe82b51 | ||
![]() |
3ed2502cab | ||
![]() |
69160baa95 | ||
![]() |
5505bd34ad | ||
![]() |
7f7a648881 | ||
![]() |
00dc6423ab | ||
![]() |
da66fb9724 | ||
![]() |
c88a540000 | ||
![]() |
e04a9b35b8 | ||
![]() |
2caebce73d | ||
![]() |
91bff7719a | ||
![]() |
470260444a | ||
![]() |
0f00051870 | ||
![]() |
e1001cc829 | ||
![]() |
8322bf3cef | ||
![]() |
1b7435c4b7 | ||
![]() |
1304cc708d | ||
![]() |
cfe034e0f9 | ||
![]() |
b3aa01a435 | ||
![]() |
bc58fe8e14 | ||
![]() |
1375cec93a | ||
![]() |
9f6326d127 | ||
![]() |
c49ba7a432 | ||
![]() |
b7c65288ad | ||
![]() |
cca7492032 | ||
![]() |
95a5cc9230 | ||
![]() |
96887861c5 | ||
![]() |
bca0620105 | ||
![]() |
dbbdaf91fc | ||
![]() |
da513b438a | ||
![]() |
2d5e4f2dcc | ||
![]() |
c10df9033a | ||
![]() |
861c571352 | ||
![]() |
617c1ca682 | ||
![]() |
de5e579e6c | ||
![]() |
0fdf9804ac | ||
![]() |
c9c8606e87 | ||
![]() |
725a6669fe | ||
![]() |
222035684f | ||
![]() |
6603bd7b40 | ||
![]() |
282ea0866a | ||
![]() |
8a6adc4e69 | ||
![]() |
9ac7c57061 | ||
![]() |
f2b77e913d | ||
![]() |
e7bbdfa937 | ||
![]() |
03eb726415 | ||
![]() |
ba38d95549 | ||
![]() |
19244f43f0 | ||
![]() |
4fae085c6e | ||
![]() |
432c5a8a93 | ||
![]() |
d5807a04e4 | ||
![]() |
e3651ea5b8 | ||
![]() |
75171c09e3 | ||
![]() |
bbe7f80be2 | ||
![]() |
078233ada8 | ||
![]() |
8ff38531b6 | ||
![]() |
019d78f398 | ||
![]() |
7335476a07 | ||
![]() |
4f934ee622 | ||
![]() |
d7599c21ae | ||
![]() |
6662e39e9d | ||
![]() |
df1615de1b | ||
![]() |
2519cc8708 | ||
![]() |
086b022698 | ||
![]() |
9c25636217 | ||
![]() |
7a2dfd9232 | ||
![]() |
029525ab4d | ||
![]() |
4e1f2a4ae9 | ||
![]() |
09e1a91002 | ||
![]() |
4c1c1349d3 | ||
![]() |
414deb3ab1 | ||
![]() |
b3b9ba4722 | ||
![]() |
f64f6d21e9 | ||
![]() |
34f91f1730 | ||
![]() |
7943fe0611 | ||
![]() |
4af7fa5d94 | ||
![]() |
4cbdde88c2 | ||
![]() |
a4ab1f6b8c | ||
![]() |
69d30adca2 | ||
![]() |
02f0da720c | ||
![]() |
8b9b1225ad | ||
![]() |
3f2c2b2ff8 | ||
![]() |
4c461a2055 | ||
![]() |
f49c3af192 | ||
![]() |
082cf33f88 | ||
![]() |
c3715c2194 | ||
![]() |
8109114d9e | ||
![]() |
6f4f77b1eb | ||
![]() |
42126c47eb | ||
![]() |
084304531a | ||
![]() |
34bac321f4 | ||
![]() |
4217baa714 | ||
![]() |
158c077dee | ||
![]() |
d03f245bca | ||
![]() |
fa156fbd52 | ||
![]() |
3b52569be5 | ||
![]() |
4f93dee697 | ||
![]() |
a880c08076 | ||
![]() |
cb8ffbd8dc | ||
![]() |
d94412984c | ||
![]() |
9bb7cb12f1 | ||
![]() |
bec03c8566 | ||
![]() |
19a54e1641 | ||
![]() |
f383624abe | ||
![]() |
1a0c4fe09a | ||
![]() |
bc42a2a343 | ||
![]() |
1cf0f0f140 | ||
![]() |
e998f19a8c | ||
![]() |
83a6413bb4 | ||
![]() |
48f4054a9c | ||
![]() |
c6a202ede0 | ||
![]() |
2397b3847c | ||
![]() |
71b3d6148f | ||
![]() |
880714283b | ||
![]() |
cfae7d81f9 | ||
![]() |
5c9dc1855e | ||
![]() |
d9deaee1e2 | ||
![]() |
679effcecd | ||
![]() |
a7056fc894 | ||
![]() |
19584f5c11 | ||
![]() |
aa12a1be85 | ||
![]() |
1f06f90b95 | ||
![]() |
1ae636b265 | ||
![]() |
6a677a6baa | ||
![]() |
9672c47652 | ||
![]() |
4de2f81e60 | ||
![]() |
4c5e843d94 | ||
![]() |
2b72ffda07 | ||
![]() |
db2d264045 | ||
![]() |
3fe8f44006 | ||
![]() |
eb0e9eacfa | ||
![]() |
7639b75311 | ||
![]() |
2f88ea9d25 | ||
![]() |
371d772c4c | ||
![]() |
3f7f6b7ced | ||
![]() |
cbf7d9a7ca | ||
![]() |
d63a725c65 | ||
![]() |
52cb52271f | ||
![]() |
0a4a6feab0 | ||
![]() |
6080aadf49 | ||
![]() |
b91506b4fb | ||
![]() |
d739ce3e57 | ||
![]() |
76b49c87bc | ||
![]() |
0d0168b1e7 | ||
![]() |
61d84abbd4 | ||
![]() |
fa0b65decf | ||
![]() |
0a6b450684 | ||
![]() |
b0567148ce | ||
![]() |
795ed2919a | ||
![]() |
00522b3d05 | ||
![]() |
ec4a1fd0e7 | ||
![]() |
8727207987 | ||
![]() |
bd961f7b6e | ||
![]() |
e9c98ab822 | ||
![]() |
d11dafd1db | ||
![]() |
5d6521f8ee | ||
![]() |
57434aa107 | ||
![]() |
61823316dc | ||
![]() |
3dd1d8aebf | ||
![]() |
3b087a00cb | ||
![]() |
b63981fb9f | ||
![]() |
358b13376a | ||
![]() |
82e26b118b | ||
![]() |
92f69bb29e | ||
![]() |
6e3e82a6f0 | ||
![]() |
504cef36c1 | ||
![]() |
d731823758 | ||
![]() |
0012aea921 | ||
![]() |
72b0a21e35 | ||
![]() |
f1d3b48db6 | ||
![]() |
cde7eb1310 | ||
![]() |
2ce930e9e2 | ||
![]() |
744dd45758 | ||
![]() |
55bdc7a512 | ||
![]() |
4ccb83803a | ||
![]() |
d0beb6875f | ||
![]() |
50c5a4df24 | ||
![]() |
51a82bf443 | ||
![]() |
b012802f95 | ||
![]() |
593cf5718f | ||
![]() |
cda19df5ca | ||
![]() |
b761c7d093 | ||
![]() |
2f8dfe4446 | ||
![]() |
2ec84c30db | ||
![]() |
06472cb11e | ||
![]() |
8156c90032 | ||
![]() |
8d5f42ff2e | ||
![]() |
d532b721a2 | ||
![]() |
588b5d3b6c | ||
![]() |
ab4bbddef7 | ||
![]() |
50c6516d6e | ||
![]() |
615b6b200b | ||
![]() |
1a7bf29bd5 | ||
![]() |
31d66e1417 | ||
![]() |
a382f2b803 | ||
![]() |
7c1d4c3b10 | ||
![]() |
6b8882b773 | ||
![]() |
9d004042f5 | ||
![]() |
d8dbf4d835 | ||
![]() |
8ce103f889 | ||
![]() |
4a2a33c081 | ||
![]() |
ff4d35b038 | ||
![]() |
e879c7df0d | ||
![]() |
5cf4aad1f9 | ||
![]() |
bcc05b6ada | ||
![]() |
4ab6c46a27 | ||
![]() |
b8b86b3b10 | ||
![]() |
ba68541d2e | ||
![]() |
41c0aa5c66 | ||
![]() |
334792abda | ||
![]() |
19cb9fdbc5 | ||
![]() |
20c0da709b | ||
![]() |
f6fd368f17 | ||
![]() |
285485009a | ||
![]() |
edf375860d | ||
![]() |
2610758faa | ||
![]() |
fe6737439a | ||
![]() |
0ce4cca4ec | ||
![]() |
54c66559e0 | ||
![]() |
45c2716e0e | ||
![]() |
f067250979 | ||
![]() |
5a08729644 | ||
![]() |
9d3e4faf3d | ||
![]() |
9ebf9c63a5 | ||
![]() |
21eb83b3c2 | ||
![]() |
7ac2d214f6 | ||
![]() |
5a3b3f78d8 | ||
![]() |
1c26120056 | ||
![]() |
7141cb1674 | ||
![]() |
fb9283a06c | ||
![]() |
6c9bfaf1b7 | ||
![]() |
e3ffe5dc61 | ||
![]() |
5184044faf | ||
![]() |
59c2e4d8bf | ||
![]() |
1f0416bbbb | ||
![]() |
d7d1c40866 | ||
![]() |
9d23c63c38 | ||
![]() |
72eac9e9c3 | ||
![]() |
4fd3247386 | ||
![]() |
e19b5911cf | ||
![]() |
9fe1c47048 | ||
![]() |
74ee085400 | ||
![]() |
4323dbbc49 | ||
![]() |
41e75d9d8f | ||
![]() |
c69b2603de | ||
![]() |
df74c87e2c | ||
![]() |
d715422e62 | ||
![]() |
0a697bb59a | ||
![]() |
022d1eee4f | ||
![]() |
dec77ac467 | ||
![]() |
850173043a | ||
![]() |
0302b7ce1c | ||
![]() |
79536c4b4b | ||
![]() |
f1bba1de0e | ||
![]() |
7475898034 | ||
![]() |
8e3fef2144 | ||
![]() |
b8a9c84845 | ||
![]() |
a23c5915a2 | ||
![]() |
5fb809c2ec | ||
![]() |
6dae0283de | ||
![]() |
7f05277f5f | ||
![]() |
6ef861ba0b | ||
![]() |
4ce743a939 | ||
![]() |
53c5a8559d | ||
![]() |
f5b1e65b30 | ||
![]() |
cd77988ee8 | ||
![]() |
f860c2b4ca | ||
![]() |
e6089c560e | ||
![]() |
455ff74aee | ||
![]() |
1f99ac5d0a | ||
![]() |
5096a90461 | ||
![]() |
8a35227d5d | ||
![]() |
4381e095cb | ||
![]() |
2fa6d25dc5 | ||
![]() |
fcde75d792 | ||
![]() |
0fc8e10167 | ||
![]() |
3a25872f26 | ||
![]() |
5c1da4f19c | ||
![]() |
d9829c3348 | ||
![]() |
52952f3335 | ||
![]() |
3e2fdb2b7b | ||
![]() |
9aaaa6f00e | ||
![]() |
af0d279e1b | ||
![]() |
82b0bcc24d | ||
![]() |
b24b170f06 | ||
![]() |
30211575c3 | ||
![]() |
ed40489e45 | ||
![]() |
c503802463 | ||
![]() |
e5a54c64df | ||
![]() |
f93b04fe1f | ||
![]() |
3b0fdc5117 | ||
![]() |
a9e686528d | ||
![]() |
2c65314066 | ||
![]() |
69d9e11e1f | ||
![]() |
d55d28aecd | ||
![]() |
a515eabcd4 | ||
![]() |
a0f7bedee0 | ||
![]() |
3179d88f36 | ||
![]() |
9298200188 | ||
![]() |
cf5746ca76 | ||
![]() |
2c8c81bc2d | ||
![]() |
07cc163d26 | ||
![]() |
ed0ea3a539 | ||
![]() |
6fafcf042a | ||
![]() |
c03fe4b044 | ||
![]() |
e50fd56dba | ||
![]() |
473ce12730 | ||
![]() |
21616e4ec2 | ||
![]() |
922ad2ff5a | ||
![]() |
f32e408705 | ||
![]() |
f6ea4847da | ||
![]() |
01ab62514b | ||
![]() |
cfa0ffa505 | ||
![]() |
ec4d773c5b | ||
![]() |
6aea40a58b | ||
![]() |
20045be2f2 | ||
![]() |
c45e3a81ba | ||
![]() |
6ee15019db | ||
![]() |
2f6877a8db | ||
![]() |
469badb8e5 | ||
![]() |
d2b4cfb5b1 | ||
![]() |
2163523359 | ||
![]() |
53ec75ae34 | ||
![]() |
bc7646fd21 | ||
![]() |
4b89991f06 | ||
![]() |
0248213f6a | ||
![]() |
36057e6f87 | ||
![]() |
886b8fd7e4 | ||
![]() |
73f1a4c471 | ||
![]() |
c1df67e3d2 | ||
![]() |
35607331de | ||
![]() |
64e0ecd6e7 | ||
![]() |
e07ad71326 |
17
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a bug report to help us improve
|
||||
title: ''
|
||||
labels: 'bug - unconfirmed'
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description about the issue you encounter.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior.
|
||||
|
||||
**Debug file**
|
||||
|
||||
If possible, please add a debug report. To do that, drag a text file with the debug report in here.
|
4
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
contact_links:
|
||||
- name: Have an idea for a new app in the RaspiBlitz? Make a suggestion in the app ideas section
|
||||
url: https://github.com/raspiblitz/raspiblitz/discussions/categories/feature-app-ideas
|
||||
about: Feature and app ideas
|
7
.github/ISSUE_TEMPLATE/documentation_improvement.md
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
name: Documentation Improvement
|
||||
about: Improvement suggestions for the documentation
|
||||
title: ''
|
||||
labels: 'documentation'
|
||||
assignees: ''
|
||||
---
|
7
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
name: Feature Request
|
||||
about: Enhancement suggestions for the RaspiBlitz
|
||||
title: ''
|
||||
labels: 'enhancement'
|
||||
assignees: ''
|
||||
---
|
105
.github/workflows/amd64-fatpack-image.yml
vendored
Normal file
@ -0,0 +1,105 @@
|
||||
name: amd64-fatpack-image-build
|
||||
|
||||
concurrency:
|
||||
group: amd64-fatpack-image-build-${{ github.head_ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
#push:
|
||||
# branches: ["dev", "v1.10"]
|
||||
# paths:
|
||||
# - 'build_sdcard.sh'
|
||||
# - 'home.admin/bitcoin.install.sh'
|
||||
# - 'home.admin/lnd.install.sh'
|
||||
# - 'home.admin/cl.install.sh'
|
||||
# - 'home.admin/cl-plugin.cln-grpc.sh'
|
||||
# - 'home.admin/tor.install.sh'
|
||||
# - 'home.admin/blitz.i2pd.sh'
|
||||
# - 'home.admin/blitz.web.sh'
|
||||
# - 'home.admin/bonus.nodejs.sh'
|
||||
# - 'home.admin/bonus.rtl.sh'
|
||||
# - 'home.admin/bonus.btcpayserver.sh'
|
||||
# - 'home.admin/bonus.thunderhub.sh'
|
||||
# - 'home.admin/bonus.jam.sh install'
|
||||
# - 'home.admin/bonus.mempool.sh'
|
||||
# - 'home.admin/blitz.web.api.sh'
|
||||
# - 'home.admin/blitz.web.ui.sh'
|
||||
# - 'home.admin/blitz.display.sh'
|
||||
# - 'ci/amd64/**'
|
||||
#pull_request:
|
||||
# branches: ["dev", "v1.10"]
|
||||
# paths:
|
||||
# - 'build_sdcard.sh'
|
||||
# - 'home.admin/bitcoin.install.sh'
|
||||
# - 'home.admin/lnd.install.sh'
|
||||
# - 'home.admin/cl.install.sh'
|
||||
# - 'home.admin/cl-plugin.cln-grpc.sh'
|
||||
# - 'home.admin/tor.install.sh'
|
||||
# - 'home.admin/blitz.i2pd.sh'
|
||||
# - 'home.admin/blitz.web.sh'
|
||||
# - 'home.admin/bonus.nodejs.sh'
|
||||
# - 'home.admin/bonus.rtl.sh'
|
||||
# - 'home.admin/bonus.btcpayserver.sh'
|
||||
# - 'home.admin/bonus.thunderhub.sh'
|
||||
# - 'home.admin/bonus.jam.sh install'
|
||||
# - 'home.admin/bonus.mempool.sh'
|
||||
# - 'home.admin/blitz.web.api.sh'
|
||||
# - 'home.admin/blitz.web.ui.sh'
|
||||
# - 'home.admin/blitz.display.sh'
|
||||
# - 'ci/amd64/**'
|
||||
|
||||
jobs:
|
||||
amd64-image-build:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set values
|
||||
id: set_values
|
||||
run: |
|
||||
echo "BUILD_DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
|
||||
echo "BUILD_VERSION=$(git describe --always --tags)" >> $GITHUB_ENV
|
||||
if [ -z "$GITHUB_HEAD_REF" ]; then
|
||||
echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
|
||||
else
|
||||
echo "BRANCH_NAME=${GITHUB_HEAD_REF}" >> $GITHUB_ENV
|
||||
fi
|
||||
if [[ "${{github.event_name}}" == "pull_request" ]]; then
|
||||
echo "GITHUB_USER=${{github.event.pull_request.head.repo.owner.login}}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "GITHUB_USER=$(echo ${{github.repository}} | cut -d'/' -f1)" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Display the build name
|
||||
run: echo "Building the raspiblitz-amd64-debian-image-${{env.BUILD_DATE}}-${{env.BUILD_VERSION}}"
|
||||
|
||||
- name: Run the build script
|
||||
run: |
|
||||
echo "Using the variables: --pack fatpack --github_user ${{steps.set_values.outputs.GITHUB_USER}} --branch ${{env.BRANCH_NAME}} --preseed_file preseed.cfg --boot uefi --desktop none"
|
||||
cd ci/amd64
|
||||
bash packer.build.amd64-debian.sh --pack fatpack --github_user ${{steps.set_values.outputs.GITHUB_USER}} --branch ${{env.BRANCH_NAME}} --preseed_file preseed.cfg --boot uefi --desktop none
|
||||
|
||||
- name: Compute checksum of the raw image
|
||||
run: |
|
||||
cd ci/amd64/builds/raspiblitz-amd64-debian-fatpack-qemu/
|
||||
sha256sum raspiblitz-amd64-debian-fatpack.qcow2 > raspiblitz-amd64-debian-fatpack.qcow2.sha256
|
||||
|
||||
- name: Compress image
|
||||
run: |
|
||||
cd ci/amd64/builds/raspiblitz-amd64-debian-fatpack-qemu/
|
||||
gzip -v9 raspiblitz-amd64-debian-fatpack.qcow2
|
||||
|
||||
- name: Compute checksum of the compressed image
|
||||
run: |
|
||||
cd ci/amd64/builds/raspiblitz-amd64-debian-fatpack-qemu/
|
||||
sha256sum raspiblitz-amd64-debian-fatpack.qcow2.gz > raspiblitz-amd64-debian-fatpack.qcow2.gz.sha256
|
||||
|
||||
- name: Upload the image and checksums
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: raspiblitz-amd64-image-${{env.BUILD_DATE}}-${{env.BUILD_VERSION}}
|
||||
path: |
|
||||
${{github.workspace}}/ci/amd64/builds/raspiblitz-amd64-debian-fatpack-qemu/raspiblitz-amd64-debian-fatpack.qcow2.sha256
|
||||
${{github.workspace}}/ci/amd64/builds/raspiblitz-amd64-debian-fatpack-qemu/raspiblitz-amd64-debian-fatpack.qcow2.gz
|
||||
${{github.workspace}}/ci/amd64/builds/raspiblitz-amd64-debian-fatpack-qemu/raspiblitz-amd64-debian-fatpack.qcow2.gz.sha256
|
89
.github/workflows/amd64-lean-image.yml
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
name: amd64-lean-image-build
|
||||
|
||||
concurrency:
|
||||
group: amd64-lean-image-build-${{ github.head_ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: ['dev', 'v1.10']
|
||||
paths:
|
||||
- 'build_sdcard.sh'
|
||||
- 'home.admin/bitcoin.install.sh'
|
||||
- 'home.admin/tor.install.sh'
|
||||
- 'home.admin/blitz.i2pd.sh'
|
||||
- 'home.admin/blitz.web.sh'
|
||||
- 'home.admin/blitz.display.sh'
|
||||
- 'ci/amd64/**'
|
||||
pull_request:
|
||||
branches: ['dev', 'v1.10']
|
||||
paths:
|
||||
- 'build_sdcard.sh'
|
||||
- 'home.admin/bitcoin.install.sh'
|
||||
- 'home.admin/tor.install.sh'
|
||||
- 'home.admin/blitz.i2pd.sh'
|
||||
- 'home.admin/blitz.web.sh'
|
||||
- 'home.admin/blitz.display.sh'
|
||||
- 'ci/amd64/**'
|
||||
|
||||
jobs:
|
||||
amd64-image-build:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Maximize build space
|
||||
uses: easimon/maximize-build-space@master
|
||||
with:
|
||||
root-reserve-mb: 12288
|
||||
temp-reserve-mb: 12288
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set values
|
||||
id: set_values
|
||||
run: |
|
||||
echo "BUILD_DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
|
||||
echo "BUILD_VERSION=$(git describe --always --tags)" >> $GITHUB_ENV
|
||||
if [ -z "$GITHUB_HEAD_REF" ]; then
|
||||
echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
|
||||
else
|
||||
echo "BRANCH_NAME=${GITHUB_HEAD_REF}" >> $GITHUB_ENV
|
||||
fi
|
||||
if [[ "${{github.event_name}}" == "pull_request" ]]; then
|
||||
echo "GITHUB_USER=${{github.event.pull_request.head.repo.owner.login}}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "GITHUB_USER=$(echo ${{github.repository}} | cut -d'/' -f1)" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Display the build name
|
||||
run: echo "Building the raspiblitz-amd64-debian-image-${{env.BUILD_DATE}}-${{env.BUILD_VERSION}}"
|
||||
|
||||
- name: Run the build script
|
||||
run: |
|
||||
echo "Using the variables: --pack lean --github_user ${{steps.set_values.outputs.GITHUB_USER}} --branch ${{env.BRANCH_NAME}} --preseed_file preseed.cfg --boot uefi --desktop gnome"
|
||||
cd ci/amd64
|
||||
bash packer.build.amd64-debian.sh --pack lean --github_user ${{steps.set_values.outputs.GITHUB_USER}} --branch ${{env.BRANCH_NAME}} --preseed_file preseed.cfg --boot uefi --desktop gnome
|
||||
|
||||
- name: Compute checksum of the raw image
|
||||
run: |
|
||||
cd ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu
|
||||
sha256sum raspiblitz-amd64-debian-lean.qcow2 > raspiblitz-amd64-debian-lean.qcow2.sha256
|
||||
|
||||
- name: Compress image
|
||||
run: |
|
||||
cd ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu
|
||||
gzip -v9 raspiblitz-amd64-debian-lean.qcow2
|
||||
|
||||
- name: Compute checksum of the compressed image
|
||||
run: |
|
||||
cd ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu
|
||||
sha256sum raspiblitz-amd64-debian-lean.qcow2.gz > raspiblitz-amd64-debian-lean.qcow2.gz.sha256
|
||||
|
||||
- name: Upload the image and checksums
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: raspiblitz-amd64-image-${{env.BUILD_DATE}}-${{env.BUILD_VERSION}}
|
||||
path: |
|
||||
${{github.workspace}}/ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu/raspiblitz-amd64-debian-lean.qcow2.sha256
|
||||
${{github.workspace}}/ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu/raspiblitz-amd64-debian-lean.qcow2.gz
|
||||
${{github.workspace}}/ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu/raspiblitz-amd64-debian-lean.qcow2.gz.sha256
|
83
.github/workflows/amd64-lean-legacyboot-image.yml
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
name: amd64-lean-legacyboot-image-build
|
||||
|
||||
concurrency:
|
||||
group: amd64-lean-legacyboot-image-build-${{ github.head_ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: ['dev', 'v1.10']
|
||||
paths:
|
||||
- 'build_sdcard.sh'
|
||||
- 'home.admin/bitcoin.install.sh'
|
||||
- 'home.admin/tor.install.sh'
|
||||
- 'home.admin/blitz.i2pd.sh'
|
||||
- 'home.admin/blitz.web.sh'
|
||||
- 'home.admin/blitz.display.sh'
|
||||
- 'ci/amd64/**'
|
||||
pull_request:
|
||||
branches: ['dev', 'v1.10']
|
||||
paths:
|
||||
- 'build_sdcard.sh'
|
||||
- 'home.admin/bitcoin.install.sh'
|
||||
- 'home.admin/tor.install.sh'
|
||||
- 'home.admin/blitz.i2pd.sh'
|
||||
- 'home.admin/blitz.web.sh'
|
||||
- 'home.admin/blitz.display.sh'
|
||||
- 'ci/amd64/**'
|
||||
|
||||
jobs:
|
||||
amd64-image-build:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set values
|
||||
id: set_values
|
||||
run: |
|
||||
echo "BUILD_DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
|
||||
echo "BUILD_VERSION=$(git describe --always --tags)" >> $GITHUB_ENV
|
||||
if [ -z "$GITHUB_HEAD_REF" ]; then
|
||||
echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
|
||||
else
|
||||
echo "BRANCH_NAME=${GITHUB_HEAD_REF}" >> $GITHUB_ENV
|
||||
fi
|
||||
if [[ "${{github.event_name}}" == "pull_request" ]]; then
|
||||
echo "GITHUB_USER=${{github.event.pull_request.head.repo.owner.login}}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "GITHUB_USER=$(echo ${{github.repository}} | cut -d'/' -f1)" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Display the build name
|
||||
run: echo "Building the raspiblitz-amd64-debian-image-${{env.BUILD_DATE}}-${{env.BUILD_VERSION}}"
|
||||
|
||||
- name: Run the build script
|
||||
run: |
|
||||
echo "Using the variables: --pack lean --github_user ${{steps.set_values.outputs.GITHUB_USER}} --branch ${{env.BRANCH_NAME}} --preseed_file preseed.cfg --boot bios --desktop none"
|
||||
cd ci/amd64
|
||||
bash packer.build.amd64-debian.sh --pack lean --github_user ${{steps.set_values.outputs.GITHUB_USER}} --branch ${{env.BRANCH_NAME}} --preseed_file preseed.cfg --boot bios --desktop none
|
||||
|
||||
- name: Compute checksum of the raw image
|
||||
run: |
|
||||
cd ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu
|
||||
sha256sum raspiblitz-amd64-debian-lean.qcow2 > raspiblitz-amd64-debian-lean.qcow2.sha256
|
||||
|
||||
- name: Compress image
|
||||
run: |
|
||||
cd ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu
|
||||
gzip -v9 raspiblitz-amd64-debian-lean.qcow2
|
||||
|
||||
- name: Compute checksum of the compressed image
|
||||
run: |
|
||||
cd ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu
|
||||
sha256sum raspiblitz-amd64-debian-lean.qcow2.gz > raspiblitz-amd64-debian-lean.qcow2.gz.sha256
|
||||
|
||||
- name: Upload the image and checksums
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: raspiblitz-amd64-image-${{env.BUILD_DATE}}-${{env.BUILD_VERSION}}
|
||||
path: |
|
||||
${{github.workspace}}/ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu/raspiblitz-amd64-debian-lean.qcow2.sha256
|
||||
${{github.workspace}}/ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu/raspiblitz-amd64-debian-lean.qcow2.gz
|
||||
${{github.workspace}}/ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu/raspiblitz-amd64-debian-lean.qcow2.gz.sha256
|
93
.github/workflows/arm64-rpi-base-image.yml
vendored
Normal file
@ -0,0 +1,93 @@
|
||||
name: arm64-rpi-base-image-build
|
||||
|
||||
concurrency:
|
||||
group: arm64-rpi-base-image-build-${{ github.head_ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: ['dev', 'v1.10', 'v1.11']
|
||||
paths:
|
||||
- 'build_sdcard.sh'
|
||||
- 'home.admin/config.scripts/bitcoin.install.sh'
|
||||
- 'home.admin/config.scripts/tor.install.sh'
|
||||
- 'home.admin/config.scripts/blitz.i2pd.sh'
|
||||
- 'home.admin/config.scripts/blitz.web.sh'
|
||||
- 'home.admin/config.scripts/blitz.display.sh'
|
||||
- 'ci/arm64-rpi/**'
|
||||
- 'home.admin/config.scripts/bonus.btc-rpc-explorer.sh'
|
||||
- 'home.admin/config.scripts/bonus.btcpayserver.sh'
|
||||
- 'home.admin/config.scripts/bonus.jam.sh'
|
||||
- 'home.admin/config.scripts/bonus.joinmarket.sh'
|
||||
- 'home.admin/config.scripts/bonus.lnbits.sh'
|
||||
- 'home.admin/config.scripts/bonus.mempool.sh'
|
||||
- 'home.admin/config.scripts/bonus.nodejs.sh'
|
||||
- 'home.admin/config.scripts/bonus.rtl.sh'
|
||||
- 'home.admin/config.scripts/bonus.thunderhub.sh'
|
||||
- 'home.admin/config.scripts/blitz.web.api.sh'
|
||||
- 'home.admin/config.scripts/blitz.web.ui'
|
||||
pull_request:
|
||||
branches: ['dev', 'v1.10', 'v1.11']
|
||||
paths:
|
||||
- 'build_sdcard.sh'
|
||||
- 'home.admin/config.scripts/bitcoin.install.sh'
|
||||
- 'home.admin/config.scripts/tor.install.sh'
|
||||
- 'home.admin/config.scripts/blitz.i2pd.sh'
|
||||
- 'home.admin/config.scripts/blitz.web.sh'
|
||||
- 'home.admin/config.scripts/blitz.display.sh'
|
||||
- 'ci/arm64-rpi/**'
|
||||
- 'home.admin/config.scripts/bonus.btc-rpc-explorer.sh'
|
||||
- 'home.admin/config.scripts/bonus.btcpayserver.sh'
|
||||
- 'home.admin/config.scripts/bonus.jam.sh'
|
||||
- 'home.admin/config.scripts/bonus.joinmarket.sh'
|
||||
- 'home.admin/config.scripts/bonus.lnbits.sh'
|
||||
- 'home.admin/config.scripts/bonus.mempool.sh'
|
||||
- 'home.admin/config.scripts/bonus.nodejs.sh'
|
||||
- 'home.admin/config.scripts/bonus.rtl.sh'
|
||||
- 'home.admin/config.scripts/bonus.thunderhub.sh'
|
||||
- 'home.admin/config.scripts/blitz.web.api.sh'
|
||||
- 'home.admin/config.scripts/blitz.web.ui'
|
||||
|
||||
jobs:
|
||||
arm64-rpi-base-image-build:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set values
|
||||
id: set_values
|
||||
run: |
|
||||
echo "BUILD_VERSION=$(git describe --always --tags)" >> $GITHUB_ENV
|
||||
if [ -z "$GITHUB_HEAD_REF" ]; then
|
||||
echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
|
||||
else
|
||||
echo "BRANCH_NAME=${GITHUB_HEAD_REF}" >> $GITHUB_ENV
|
||||
fi
|
||||
if [[ "${{github.event_name}}" == "pull_request" ]]; then
|
||||
echo "GITHUB_USER=${{github.event.pull_request.head.repo.owner.login}}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "GITHUB_USER=$(echo ${{github.repository}} | cut -d'/' -f1)" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Display the build name
|
||||
run: echo "Building the raspiblitz-arm64-rpi-base-image"
|
||||
|
||||
- name: Run the build script
|
||||
run: |
|
||||
echo "Using the variables: --pack base --github_user ${{steps.set_values.outputs.GITHUB_USER}} --branch ${{env.BRANCH_NAME}} --image_size 18G"
|
||||
cd ci/arm64-rpi
|
||||
bash packer.build.arm64-rpi.sh --pack base --github_user ${{steps.set_values.outputs.GITHUB_USER}} --branch ${{env.BRANCH_NAME}} --image_size 18G
|
||||
|
||||
- name: Calculate the checksum of the raw image
|
||||
run: |
|
||||
cd ci/arm64-rpi
|
||||
sha256sum raspiblitz-arm64-rpi-base.img > raspiblitz-arm64-rpi-base.img.sha256
|
||||
|
||||
- name: Upload the base image and checksum
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: raspiblitz-arm64-rpi-base-image-${{ env.BUILD_VERSION }}
|
||||
path: |
|
||||
${{ github.workspace }}/ci/arm64-rpi/raspiblitz-arm64-rpi-base.img.sha256
|
||||
${{ github.workspace }}/ci/arm64-rpi/raspiblitz-arm64-rpi-base.img
|
83
.github/workflows/arm64-rpi-lean-image.yml
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
name: arm64-rpi-lean-image-build
|
||||
|
||||
concurrency:
|
||||
group: arm64-rpi-lean-image-build-${{ github.head_ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: ['dev', 'v1.10']
|
||||
paths:
|
||||
- 'build_sdcard.sh'
|
||||
- 'home.admin/bitcoin.install.sh'
|
||||
- 'home.admin/tor.install.sh'
|
||||
- 'home.admin/blitz.i2pd.sh'
|
||||
- 'home.admin/blitz.web.sh'
|
||||
- 'home.admin/blitz.display.sh'
|
||||
- 'ci/arm64-rpi/**'
|
||||
pull_request:
|
||||
branches: ['dev', 'v1.10']
|
||||
paths:
|
||||
- 'build_sdcard.sh'
|
||||
- 'home.admin/bitcoin.install.sh'
|
||||
- 'home.admin/tor.install.sh'
|
||||
- 'home.admin/blitz.i2pd.sh'
|
||||
- 'home.admin/blitz.web.sh'
|
||||
- 'home.admin/blitz.display.sh'
|
||||
- 'ci/arm64-rpi/**'
|
||||
|
||||
jobs:
|
||||
arm64-rpi-image-build:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set values
|
||||
id: set_values
|
||||
run: |
|
||||
echo "BUILD_DATE=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
|
||||
echo "BUILD_VERSION=$(git describe --always --tags)" >> $GITHUB_ENV
|
||||
if [ -z "$GITHUB_HEAD_REF" ]; then
|
||||
echo "BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
|
||||
else
|
||||
echo "BRANCH_NAME=${GITHUB_HEAD_REF}" >> $GITHUB_ENV
|
||||
fi
|
||||
if [[ "${{github.event_name}}" == "pull_request" ]]; then
|
||||
echo "GITHUB_USER=${{github.event.pull_request.head.repo.owner.login}}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "GITHUB_USER=$(echo ${{github.repository}} | cut -d'/' -f1)" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Display the build name
|
||||
run: echo "Building the raspiblitz-arm64-rpi-lean-image-${{ env.BUILD_DATE }}-${{ env.BUILD_VERSION }}"
|
||||
|
||||
- name: Run the build script
|
||||
run: |
|
||||
echo "Using the variables: --pack lean --github_user ${{steps.set_values.outputs.GITHUB_USER}} --branch ${{env.BRANCH_NAME}}"
|
||||
cd ci/arm64-rpi
|
||||
bash packer.build.arm64-rpi.sh --pack lean --github_user ${{steps.set_values.outputs.GITHUB_USER}} --branch ${{env.BRANCH_NAME}}
|
||||
|
||||
- name: Compute checksum of the raw image
|
||||
run: |
|
||||
cd ci/arm64-rpi
|
||||
sha256sum raspiblitz-arm64-rpi-lean.img > raspiblitz-arm64-rpi-lean.img.sha256
|
||||
|
||||
- name: Compress image
|
||||
run: |
|
||||
cd ci/arm64-rpi
|
||||
gzip -v9 raspiblitz-arm64-rpi-lean.img
|
||||
|
||||
- name: Compute checksum of the compressed image
|
||||
run: |
|
||||
cd ci/arm64-rpi
|
||||
sha256sum raspiblitz-arm64-rpi-lean.img.gz > raspiblitz-arm64-rpi-lean.img.gz.sha256
|
||||
|
||||
- name: Upload the image and checksums
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: raspiblitz-arm64-rpi-image-${{ env.BUILD_DATE }}-${{ env.BUILD_VERSION }}
|
||||
path: |
|
||||
${{ github.workspace }}/ci/arm64-rpi/raspiblitz-arm64-rpi-lean.img.sha256
|
||||
${{ github.workspace }}/ci/arm64-rpi/raspiblitz-arm64-rpi-lean.img.gz
|
||||
${{ github.workspace }}/ci/arm64-rpi/raspiblitz-arm64-rpi-lean.img.gz.sha256
|
20
.github/workflows/spelling.yml
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
name: Spelling
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: ['dev', 'v1.10', 'v1.11']
|
||||
pull_request:
|
||||
branches: ['dev', 'v1.10', 'v1.11']
|
||||
|
||||
jobs:
|
||||
spelling:
|
||||
name: Spell Check with Typos
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions Repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Spell Check Repo
|
||||
uses: crate-ci/typos@master
|
||||
with:
|
||||
config: typos.toml
|
38
.github/workflows/test-bats.yml
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
name: Test bats
|
||||
|
||||
concurrency:
|
||||
group: test-bats-${{ github.head_ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: ["dev"]
|
||||
paths:
|
||||
- "home.admin/config.scripts/bonus.postgresql.sh"
|
||||
pull_request:
|
||||
branches: ["dev"]
|
||||
paths:
|
||||
- "home.admin/config.scripts/bonus.postgresql.sh"
|
||||
|
||||
jobs:
|
||||
run-bats-tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install bats
|
||||
run: |
|
||||
sudo apt update &>/dev/null
|
||||
sudo apt install -y bats
|
||||
|
||||
- name: Run the bats tests with postgresql 15
|
||||
run: |
|
||||
cd test
|
||||
sudo bats ./bonus.postgresql-15.bats
|
||||
|
||||
- name: Run the bats tests with postgresql 13
|
||||
run: |
|
||||
cd test
|
||||
sudo bats ./bonus.postgresql-13.bats
|
4
.gitignore
vendored
@ -6,3 +6,7 @@ __pycache__
|
||||
lightning_pb2.pyc
|
||||
lightning_pb2_grpc.pyc
|
||||
/.vagrant/
|
||||
ci/amd64/builds
|
||||
ci/arm64-rpi/raspiblitz-arm64-rpi*
|
||||
ci/arm64-rpi/.packer*
|
||||
ci/arm64-rpi/packer-builder-arm
|
||||
|
140
CHANGES.md
@ -1,4 +1,137 @@
|
||||
# CHANGES between Releases
|
||||
## What's new in Version 1.11.1 of RaspiBlitz?
|
||||
|
||||
- New: Set Timezone SSHMENU > SYSTEM > TIME [details](https://github.com/raspiblitz/raspiblitz/issues/1712)
|
||||
- New: Labelbase 2.2.1 [details](https://x.com/labelbase_space)
|
||||
- New: Redesign WebUI Setup & Recovery
|
||||
- Update: amd64 base image: debian-12.6.0-amd64-netinst.iso
|
||||
- Update: LNbits 0.12.8 [details](https://github.com/lnbits/lnbits/releases/tag/0.12.8)
|
||||
- Update: Specter Desktop 2.0.4 with reactivated UPDATE option [details](https://github.com/cryptoadvance/specter-desktop/releases/tag/v2.0.4)
|
||||
- Update: BTCPayServer 1.13.0 [details](https://github.com/btcpayserver/btcpayserver/releases/tag/v1.13.0)
|
||||
- Update: acme.sh 3.0.7 (repair duckdns.org dyndns)
|
||||
- Update: show progress of electrs building index on LCD
|
||||
- Update: lndmanage 0.16.0 [details](https://github.com/bitromortac/lndmanage)
|
||||
- Update: Lightning Terminal v0.12.5-alpha [details](https://github.com/lightninglabs/lightning-terminal/releases/tag/v0.12.5-alpha)
|
||||
- Update: PyBlock 2.7.2 [details](https://github.com/curly60e/pyblock/blob/master/README.md)
|
||||
- Update: Bitcoin Core 27.1 (as tested update) [details](https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-27.1.md)
|
||||
- Experimental: charge-lnd install script [details](https://github.com/raspiblitz/raspiblitz/discussions/3955)
|
||||
- Experimental: config.scripts/lnd.signaddress.sh to easy sign messages on addresses on LND [details](https://github.com/raspiblitz/raspiblitz/issues/4540)
|
||||
- Experimental: config.scripts/bonus.elements.sh install elements blockchain platform [details](https://github.com/ElementsProject/elements)
|
||||
- Deprecated: Sphinx-Relay [details](https://github.com/raspiblitz/raspiblitz/issues/2558)
|
||||
- Remove: AutoPilot & Keysend from SSH menus [details](https://github.com/raspiblitz/raspiblitz/issues/1953#issuecomment-1811553602)
|
||||
- Remove: Tallycoin-Connect [see service shutdown](https://x.com/djbooth007/status/1784409117563720082)
|
||||
- Remove: IP2Tor Shoplist [details](https://github.com/raspiblitz/raspiblitz/issues/4589)
|
||||
- Remove: CopyStation Script [details](https://github.com/raspiblitz/raspiblitz/issues/4538)
|
||||
|
||||
## What's new in Version 1.11.0 of RaspiBlitz?
|
||||
|
||||
- New: RaspberryPi5 tested & enabling NVMe PCIe Hats
|
||||
- New: BTCPay Server PostgreSQL database backup and restore options [details](https://github.com/raspiblitz/raspiblitz/pull/4409)
|
||||
- New: Reset option for the self-signed TLS certificate [details](https://github.com/raspiblitz/raspiblitz/pull/4412)
|
||||
- New on WebUI: Electrum Connect Screen
|
||||
- Update: RaspberryOS arm64 base image 2024-03-15 (Debian 12 Bookworm) [details](https://downloads.raspberrypi.com/raspios_full_arm64/release_notes.txt)
|
||||
- Update: amd64 base image: debian-12.5.0-amd64-netinst.iso
|
||||
- Update: Bitcoin Core v26.0 [details](https://bitcoincore.org/en/releases/26.0/)
|
||||
- Update: LND v0.17.3-beta [details](https://github.com/lightningnetwork/lnd/releases/tag/v0.17.3-beta)
|
||||
- Update: Core Lightning v24.02.1 [details](https://github.com/ElementsProject/lightning/releases/tag/v24.02.1)
|
||||
- Update: C-lightningREST v0.10.7 [details](https://github.com/Ride-The-Lightning/c-lightning-REST/releases/tag/v0.10.7)
|
||||
- Update: Electrum Server in Rust (electrs) v0.10.4 [details](https://github.com/romanz/electrs/blob/master/RELEASE-NOTES.md#0104-mar-15-2024)
|
||||
- Update: Fulcrum Electrum server v1.10.0 (CLI install script) [details](https://github.com/cculianu/Fulcrum/releases/tag/v1.10.0)
|
||||
- Update: BTC-RPC-Explorer v3.4.0 [details](https://github.com/janoside/btc-rpc-explorer/blob/master/CHANGELOG.md#v340)
|
||||
- Update: JoinMarket v0.9.11 [details](https://github.com/JoinMarket-Org/joinmarket-clientserver/releases/tag/v0.9.11)
|
||||
- Update: Jam (JoinMarket Web UI) v0.2.0 [details](https://github.com/joinmarket-webui/jam/releases/tag/v0.2.0)
|
||||
- Update: JoininBox v0.8.3 [details](https://github.com/openoms/joininbox/releases/tag/v0.8.3)
|
||||
- Update: RTL v0.14.1 [details](https://github.com/Ride-The-Lightning/RTL/releases/tag/v0.14.1)
|
||||
- Update: Thunderhub v0.13.30 [details](https://github.com/apotdevin/thunderhub/releases/tag/v0.13.30)
|
||||
- Update: CLBOSS 0.13+ (latest master 0673c50) [details](https://github.com/ZmnSCPxj/clboss/releases/tag/v0.13)
|
||||
- Update: BTCPayServer v1.12.5 [details](https://github.com/btcpayserver/btcpayserver/releases/tag/v1.12.5)
|
||||
- Update: Channel Tools (chantools) v0.12.0 [details](https://github.com/lightninglabs/chantools/releases/tag/v0.12.0)
|
||||
- Update: LNbits 0.11.3 [details](https://github.com/lnbits/lnbits/releases/tag/0.11.3)
|
||||
- Update: Circuitbreaker v0.5.1 [details](https://github.com/lightningequipment/circuitbreaker/blob/master/README.md)
|
||||
- Update: LNDg v1.8.0 [details](https://github.com/cryptosharks131/lndg/releases/tag/v1.8.0)
|
||||
- Update: Balance of Satoshis v17.9.1 [details](https://www.npmjs.com/package/balanceofsatoshis/v/17.9.1)
|
||||
- Experimental: LNDK (runs on top of LND to help forward onion messages (BOLT 12)) [details](https://github.com/lndk-org/lndk)
|
||||
- Fix: PyBlock 2.2.3 [details](https://github.com/curly60e/pyblock/blob/master/README.md)
|
||||
- Refactor: Wifi config with file on sd card
|
||||
- Deactivated for Repair: lnproxy [details](https://github.com/raspiblitz/raspiblitz/issues/4122)
|
||||
- Deprecated: Homer Dashboard (remove from SSH menus, config script will stay with possible future removal)
|
||||
- Deprecated: Bitcoinminds (remove from SSH menus, config script will stay with possible future removal)
|
||||
- Remove: ItchySats (unmaintained project / in consent with dev)
|
||||
|
||||
## What's new in Version 1.10.0 of RaspiBlitz?
|
||||
|
||||
- Update: RaspiOS base image from 2023-05-03
|
||||
- Update: Bitcoin Core v25.0.0 [details](https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-25.0.md)
|
||||
- Update: LND v0.16.4-beta [details](https://github.com/lightningnetwork/lnd/releases/tag/v0.16.4-beta)
|
||||
- Update: Core Lightning v23.08.1 [details](https://github.com/ElementsProject/lightning/releases/tag/v23.08.1)
|
||||
- Update: Suez - Channel Visualization for LND & CLN [details](https://github.com/prusnak/suez)
|
||||
- Update: Electrum Server in Rust (electrs) v0.10.0 [details](https://github.com/romanz/electrs/blob/master/RELEASE-NOTES.md#0100-jul-22-2023)
|
||||
- Update: C-lightningREST v0.10.5 [details](https://github.com/Ride-The-Lightning/c-lightning-REST/releases/tag/v0.10.5)
|
||||
- Update: RTL v0.14.0 [details](https://github.com/Ride-The-Lightning/RTL/releases/tag/v0.14.0)
|
||||
- Update: Lightning Terminal v0.10.1-alpha [details](https://github.com/lightninglabs/lightning-terminal/releases/tag/v0.10.1-alpha)
|
||||
- Update: Channel Tools (chantools) v0.11.3 [details](https://github.com/guggero/chantools/releases/tag/v0.11.3)
|
||||
- Update: LNDg v1.7.0 [details](https://github.com/cryptosharks131/lndg)
|
||||
- Update: Thunderhub v0.13.19 [details](https://github.com/apotdevin/thunderhub/releases/tag/v0.13.19)
|
||||
- Update: LNbits 0.10.10 [details](https://github.com/lnbits/lnbits/releases/tag/0.10.10)
|
||||
- Update: BTCPayServer 1.10.3 (postgres by default with sqlite migration) [details](https://github.com/btcpayserver/btcpayserver/releases/tag/v1.10.3)
|
||||
- Update: Specter Desktop 1.13.1 [details](https://github.com/cryptoadvance/specter-desktop/releases/tag/v1.13.1)
|
||||
- Update: Kindle-Display 0.5.1 [details](https://github.com/dennisreimann/kindle-display/)
|
||||
- Update: JoinMarket v0.9.10 [details](https://github.com/JoinMarket-Org/joinmarket-clientserver/releases/tag/v0.9.10)
|
||||
- Update: JoininBox v0.8.1 [details](https://github.com/openoms/joininbox/releases/tag/v0.8.1)
|
||||
- Update: Balance of Satoshis 15.11.0 (bos) [details](https://github.com/alexbosworth/balanceofsatoshis/blob/master/CHANGELOG.md#15110)
|
||||
- Fix: Homebanking Interface FinTS/HBCI (experimental) [details](https://github.com/rootzoll/raspiblitz/issues/1186)
|
||||
- Remove: Spark Wallet and Sparko CLN plugin (not maintained anymore)
|
||||
- Remove: Faraday, Loop, Pool single installs - used in the LiT package instead
|
||||
- Remove: deactivate LNproxy in the menu and in provision
|
||||
- Info: the users not intended to be logged in will not be available to change into (manage them from admin with sudo)
|
||||
|
||||
## What's new in Version 1.9.0 of RaspiBlitz?
|
||||
|
||||
- New: Automated disk image build for amd64 (VM, laptop, desktop, server) and arm64-rpi (Raspberry Pi) [details](https://github.com/rootzoll/raspiblitz/tree/dev/ci/README.md)
|
||||
- New: Fatpack & Minimal sd card builds [details](SECURITY.md#minimal-sd-card-build)
|
||||
- New: I2P support for Bitcoin Core (i2pacceptincoming=1) [details](https://github.com/rootzoll/raspiblitz/issues/2413)
|
||||
- New: CLN Watchtower (The Eye of Satoshi) [details](https://github.com/talaia-labs/rust-teos/tree/master/watchtower-plugin)
|
||||
- New: LNDg v1.6.0 [details](https://github.com/cryptosharks131/lndg)
|
||||
- New: Support of X708 UPS HAT [details](https://github.com/rootzoll/raspiblitz/pull/3087)
|
||||
- New: BOS Telegram Bot Support (see OPTIONS on LND Balance of Satoshis menu entry)
|
||||
- New: LightningTipBot v0.5 [details](https://github.com/LightningTipBot/LightningTipBot)
|
||||
- New: ↬lnproxy cli shortcut and server [details](https://github.com/lnproxy)
|
||||
- New: Homebanking Interface FinTS/HBCI (experimental) [details](https://github.com/rootzoll/raspiblitz/issues/1186)
|
||||
- New on WebUI: Jam (JoinMarket Web UI) v0.1.5 [details](https://github.com/joinmarket-webui/joinmarket-webui/releases/tag/v0.1.5)
|
||||
- New on WebUI: Generate/Download Debug Report from Settings
|
||||
- Update: Bitcoin Core v24.0.1 [details](https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-24.0.1.md)
|
||||
- Update: LND v0.16.2-beta [details](https://github.com/lightningnetwork/lnd/releases/tag/v0.16.2-beta)
|
||||
- Update: Core Lightning v23.02.2 [details](https://github.com/ElementsProject/lightning/releases/tag/v23.02.2)
|
||||
- Update: C-lightningREST v0.10.2 [details](https://github.com/Ride-The-Lightning/c-lightning-REST/releases/tag/v0.10.2)
|
||||
- Update: Electrum Server in Rust (electrs) v0.9.11 [details](https://github.com/romanz/electrs/blob/master/RELEASE-NOTES.md#0911-jan-5-2023)
|
||||
- Update: Lightning Terminal v0.8.6-alpha [details](https://github.com/lightninglabs/lightning-terminal/releases/tag/v0.8.6-alpha)
|
||||
- Update: RTL v0.13.6 with update option [details](https://github.com/Ride-The-Lightning/RTL/releases/tag/v0.13.6)
|
||||
- Update: Thunderhub v0.13.16 with balance sharing disabled [details](https://github.com/apotdevin/thunderhub/releases/tag/v0.13.16)
|
||||
- Update: LNbits 0.10.6 [details](https://github.com/lnbits/lnbits/releases/tag/0.10.6)
|
||||
- Update: BTCPayServer 1.9.3 (postgres by default with sqlite migration) [details](https://github.com/btcpayserver/btcpayserver/releases/tag/v1.9.3)
|
||||
- Update: ItchySats 0.7.0 [details](https://github.com/itchysats/itchysats/releases/tag/0.7.0)
|
||||
- Update: Channel Tools (chantools) v0.10.5 [details](https://github.com/guggero/chantools/releases/tag/v0.10.5)
|
||||
- Update: JoinMarket v0.9.9 [details](https://github.com/JoinMarket-Org/joinmarket-clientserver/releases/tag/v0.9.9)
|
||||
- Update: JoininBox v0.7.7 [details](https://github.com/openoms/joininbox/releases/tag/v0.7.7)
|
||||
- Update: Balance of Satoshis 13.15.0 (bos) [details](https://github.com/alexbosworth/balanceofsatoshis/blob/master/CHANGELOG.md#13150)
|
||||
- Update: lndmanage 0.15.0 [details](https://github.com/bitromortac/lndmanage)
|
||||
- Update: Circuitbreaker with webUI [details](https://github.com/lightningequipment/circuitbreaker/blob/master/README.md)
|
||||
- Update: Suez - Channel Visualization for LND & CL [details](https://github.com/prusnak/suez)
|
||||
- Update: Tallycoin Connect v1.8.0 [details](https://github.com/djbooth007/tallycoin_connect/releases/tag/v1.8.0)
|
||||
- Update: Fulcrum install script (CLI only) v1.9.1 [details](https://github.com/cculianu/Fulcrum/releases/tag/v1.9.1)
|
||||
- Fixed: SCB/Emergency-Backup to USB drive (now also with CLN emergency.recover file)
|
||||
- Info: Run RaspiBlitz on Proxmox [details](https://github.com/rootzoll/raspiblitz/tree/dev/alternative.platforms/Proxmox)
|
||||
- Info: IP2Tor fix fulmo shop & added new ip2tor.com shop
|
||||
- Info: 32GB sdcard is now enforced (after being recommended since v1.5)
|
||||
- Info: 'Reindex Blockchain' is now part of 'repair' menu
|
||||
|
||||
## What's new in Version 1.8.0c of RaspiBlitz?
|
||||
|
||||
- Update: LND v0.15.4 (emergency hotfix release) [details](https://github.com/lightningnetwork/lnd/releases/tag/v0.15.4-beta)
|
||||
- Update: Electrum Server in Rust (electrs) v0.9.9 [details](https://github.com/romanz/electrs/blob/master/RELEASE-NOTES.md#099-jul-12-2022)
|
||||
|
||||
## What's new in Version 1.8.0b of RaspiBlitz?
|
||||
|
||||
- Update: LND v0.15.2 (emergency hotfix release) [details](https://github.com/lightningnetwork/lnd/releases/tag/v0.15.2-beta)
|
||||
|
||||
## What's new in Version 1.8.0 of RaspiBlitz?
|
||||
|
||||
@ -19,7 +152,7 @@
|
||||
- Update: C-lightningREST v0.7.2 [details](https://github.com/Ride-The-Lightning/c-lightning-REST/releases/tag/v0.7.2)
|
||||
- Update: CLBOSS 0.13A [details](https://github.com/ZmnSCPxj/clboss/releases/tag/0.13A)
|
||||
- Update: Channel Tools (chantools) v0.10.4 [details](https://github.com/guggero/chantools/blob/master/README.md)
|
||||
- Update: Lightning Terminal v0.7.0-alpha with Lightning Node Connect over Tor [details](https://github.com/lightninglabs/lightning-terminal/releases/tag/v0.7.0-alpha)
|
||||
- Update: Lightning Terminal v0.9.2-alpha with Lightning Node Connect over Tor [details](https://github.com/lightninglabs/lightning-terminal/releases/tag/v0.9.2-alpha)
|
||||
- Update: JoinMarket v0.9.6 [details](https://github.com/JoinMarket-Org/joinmarket-clientserver/releases/tag/v0.9.6)
|
||||
- Update: JoininBox v0.6.8 [details](https://github.com/openoms/joininbox/releases/tag/v0.6.8)
|
||||
- Update: JoinMarket Web UI (Jam) v0.0.9 (CLI install script) [details](https://github.com/joinmarket-webui/joinmarket-webui/releases/tag/v0.0.9)
|
||||
@ -182,7 +315,7 @@ There was a small patch-update with raspiblitz-v1.7.1-2021-10-28.img.gz to fix a
|
||||
- New: Circuit Breaker (config-script) [details](https://github.com/rootzoll/raspiblitz/issues/1581)
|
||||
- New: PyBlock (Python Util & Fun Scripts) [details](https://github.com/curly60e/pyblock/blob/master/README.md)
|
||||
- New: Mempool Explorer [details](https://github.com/mempool/mempool)
|
||||
- New: dynu.com as alternative option for LetsEncrpyt FreeDNS provider
|
||||
- New: dynu.com as alternative option for LetsEncrypt FreeDNS provider
|
||||
- New: Experimental running RaspiBlitz as VM (vagrant & docker)
|
||||
|
||||
For ALL small bug fixes & improvements see: https://github.com/rootzoll/raspiblitz/milestone/11
|
||||
@ -352,4 +485,3 @@ Version 1.1 packs some first fixes and enhancements to make the RaspiBlitz more
|
||||
- Removed: FTP download option for blockchain
|
||||
|
||||
For full details see issue list of [Release 1.1 Milestone](https://github.com/rootzoll/raspiblitz/milestone/3?closed=1).
|
||||
|
||||
|
6
CODEOWNERS
Normal file
@ -0,0 +1,6 @@
|
||||
# For info see https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
|
||||
|
||||
# These owners will be the default owners for everything in the repo.
|
||||
# Unless a later match takes precedence, these users will be requested for review when someone opens a pull request.
|
||||
|
||||
* @rootzoll @openoms
|
@ -1,35 +1,42 @@
|
||||
# Community development
|
||||
|
||||
Everybody is welcome to join, improve, and extend the RaspiBlitz - it's a work in progress. Check the issues if you wanna help out or add new ideas. You can find the scripts used for RaspiBlitz interactions on the device at /home/admin or in this Git repo's subfolder home.admin.
|
||||
|
||||
## Understanding Blitz project
|
||||
RaspiBlitz is insipired by the [RaspiBolt guide](https://raspibolt.github.io/raspibolt/). Tutorial on how to build a lightning node on the RaspberryPi. So much thx to Stadicus :)
|
||||
|
||||
RaspiBlitz is inspired by the [RaspiBolt guide](https://raspibolt.github.io/raspibolt/). Tutorial on how to build a lightning node on the RaspberryPi. So much thx to Stadicus :)
|
||||
To start your Deep Dive into the RaspiBlitz project, watch [this video](https://www.youtube.com/watch?v=QXUGg45CWLo).
|
||||
|
||||
### Blitz philosophy
|
||||
|
||||
* DIY community development, if you are unhappy with the code, fork and pull request, this will make you you DYOR instead of depending on the developers.
|
||||
* DIY community development, if you are unhappy with the code, fork and pull request, this will make you DYOR instead of depending on the developers.
|
||||
* If you ask when the next release will be available, we don't know, but if you contribute, it might be faster.
|
||||
* Be sure to contribute back, every little help is wanted.
|
||||
|
||||
## Getting started
|
||||
|
||||
Get all details on "How to contribute to RaspiBlitz Development" on [this video](https://www.youtube.com/watch?v=ZVtZepV3OfM).
|
||||
|
||||
### Levels
|
||||
|
||||
All levels are important. Even advanced users help on basic levels for other Blitzers. Every help is welcome.
|
||||
Not all enhancements needs to go through all levels, these are levels of difficulty, scalability depends on your skills.
|
||||
|
||||
#### Basic
|
||||
|
||||
1. **Reporting user side** --> Open an issue to indicate a problem or make a feature request.
|
||||
1. **Community support** --> Solve other people issues.
|
||||
1. **Good first issue** --> The purpose of the good first issue label is to highlight which issues are suitable for a new contributor without a deep understanding of the codebase.
|
||||
|
||||
#### Medium
|
||||
|
||||
1. **Sovereignty** --> Fork the repo to have the changes controlled by you.
|
||||
1. **Experiment** --> Try things out on your RaspiBlitz.
|
||||
1. **Executable** --> Turn your experiment into a basic shell script.
|
||||
|
||||
#### Advanced
|
||||
1. **Config script** --> Integrate your executable into the RaspiBlitz enviroment.
|
||||
|
||||
1. **Config script** --> Integrate your executable into the RaspiBlitz environment.
|
||||
1. **SSH-GUI** --> Make it easier for others to use your config script.
|
||||
1. **WEB-GUI** --> Turn your feature into customer ready
|
||||
|
||||
@ -49,7 +56,7 @@ and is also an effective way to request assistance if and when you need it.
|
||||
1. Make sure it is compatible with Blitz philosophy.
|
||||
1. Fork the repo
|
||||
1. Commit changes on the new branch
|
||||
1. Open a pull request (PR are made to the `dev` branch unless indicated otherwise by a collaborator.
|
||||
1. Open a pull request (PRs are made to the `dev` branch unless indicated otherwise by a collaborator.
|
||||
|
||||
#### Review
|
||||
|
||||
@ -70,7 +77,7 @@ NACKs without accompanying reasoning may be disregarded.
|
||||
After conceptual agreement on the change, code review can be provided. A review begins with the urgent necessity of the changes.
|
||||
Start from urgent to less important:
|
||||
1. Security risk.
|
||||
1. Code that breaks the enviroment.
|
||||
1. Code that breaks the environment.
|
||||
1. Enhancing current services functionality.
|
||||
1. Solving a common issue.
|
||||
1. Adding new applications.
|
||||
@ -82,5 +89,5 @@ Reviewers that have demonstrated a deeper commitment and understanding of the pr
|
||||
The project leader is the release manager for each RaspiBlitz release.
|
||||
|
||||
## Copyright
|
||||
By contributing to this repository, you agree to license your work under the [MIT license](https://github.com/rootzoll/raspiblitz/blob/master/LICENSE).
|
||||
By contributing to this repository, you agree to license your work under the [MIT license](https://github.com/raspiblitz/raspiblitz/blob/master/LICENSE).
|
||||
Any work contributed where you are not the original author must contain its license header with the original author(s) and source.
|
||||
|
931
FAQ.cl.md
@ -1,931 +0,0 @@
|
||||
<!-- omit in toc -->
|
||||
# Core Lightning on the RaspiBlitz FAQ
|
||||
|
||||
<!-- omit in toc -->
|
||||
## Table of Contents
|
||||
- [Common questions about the different Lightning Network implementations](#common-questions-about-the-different-lightning-network-implementations)
|
||||
- [Can LND and CLN nodes open channels to each other and route payments?](#can-lnd-and-cln-nodes-open-channels-to-each-other-and-route-payments)
|
||||
- [Can I run LND and CLN connected to the same node?](#can-i-run-lnd-and-cln-connected-to-the-same-node)
|
||||
- [Can I convert an LND node to CLN (or the opposite)?](#can-i-convert-an-lnd-node-to-cln-or-the-opposite)
|
||||
- [Is there a table to quickly compare LND and CLN?](#is-there-a-table-to-quickly-compare-lnd-and-cln)
|
||||
- [CLN official documentation and support channels](#cln-official-documentation-and-support-channels)
|
||||
- [Commands and aliases](#commands-and-aliases)
|
||||
- [Directories](#directories)
|
||||
- [Config file](#config-file)
|
||||
- [Default values](#default-values)
|
||||
- [Plug-ins](#plug-ins)
|
||||
- [General info](#general-info)
|
||||
- [Directories](#directories-1)
|
||||
- [Implemented plugins](#implemented-plugins)
|
||||
- [Add a custom plugin](#add-a-custom-plugin)
|
||||
- [CLBOSS](#clboss)
|
||||
- [Feeadjuster](#feeadjuster)
|
||||
- [Dual funded channels](#dual-funded-channels)
|
||||
- [Reading](#reading)
|
||||
- [Setting up](#setting-up)
|
||||
- [Open a dual funded channel](#open-a-dual-funded-channel)
|
||||
- [Fundchannel syntax](#fundchannel-syntax)
|
||||
- [Multifundchannel syntax](#multifundchannel-syntax)
|
||||
- [Offers](#offers)
|
||||
- [About the feature bits](#about-the-feature-bits)
|
||||
- [Testnets](#testnets)
|
||||
- [Backups](#backups)
|
||||
- [Backup strategy](#backup-strategy)
|
||||
- [Seed](#seed)
|
||||
- [How to display the hsm_secret in a human-readable format?](#how-to-display-the-hsm_secret-in-a-human-readable-format)
|
||||
- [How to test the seedwords?](#how-to-test-the-seedwords)
|
||||
- [How to restore the hsm_secret from text?](#how-to-restore-the-hsm_secret-from-text)
|
||||
- [Channel database](#channel-database)
|
||||
- [Recovery](#recovery)
|
||||
- [Recover from a cl-rescue file](#recover-from-a-cl-rescue-file)
|
||||
- [Recover from a seed](#recover-from-a-seed)
|
||||
- [Restore a CLN node from the database backup on the SDcard](#restore-a-cln-node-from-the-database-backup-on-the-sdcard)
|
||||
- [Rescan the chain after restoring a used CLN wallet](#rescan-the-chain-after-restoring-a-used-cln-wallet)
|
||||
- [Guesstoremote to recover funds from force-closed channels](#guesstoremote-to-recover-funds-from-force-closed-channels)
|
||||
- [sqlite3 queries](#sqlite3-queries)
|
||||
- [Update](#update)
|
||||
- [Update to a new CLN release](#update-to-a-new-cln-release)
|
||||
- [Experimental update to the latest master](#experimental-update-to-the-latest-master)
|
||||
- [sqlite3 queries](#sqlite3-queries-1)
|
||||
- [Script file help list](#script-file-help-list)
|
||||
- [All possible config options](#all-possible-config-options)
|
||||
|
||||
## Common questions about the different Lightning Network implementations
|
||||
|
||||
### Can LND and CLN nodes open channels to each other and route payments?
|
||||
* Yes, all [BOLT specification](https://github.com/lightningnetwork/lightning-rfc) compliant implementations can open channels to each other and route payments.
|
||||
|
||||
### Can I run LND and CLN connected to the same node?
|
||||
* Yes, both can run parallel on a RaspiBlitz and even have channels witch each other.
|
||||
|
||||
### Can I convert an LND node to CLN (or the opposite)?
|
||||
* No, currently there are no tools available to convert between the databases storing the channel states.
|
||||
The channels would need to be closed to use the same funds in an other node.
|
||||
|
||||
### Is there a table to quickly compare LND and CLN?
|
||||
* see [github.com/openoms/lightning-node-management/blob/master/node-types/comparison.md](https://github.com/openoms/lightning-node-management/blob/master/node-types/comparison.md)
|
||||
|
||||
---
|
||||
|
||||
## CLN official documentation and support channels
|
||||
* https://lightning.readthedocs.io/
|
||||
* https://github.com/ElementsProject/lightning
|
||||
* Telegram: https://t.me/lightningd
|
||||
* Discord: https://discord.gg/YGdpyj2aXj
|
||||
* IRC: #c-lightning on libera.chat or https://matrix.to/#/#c-lightning:libera.chat
|
||||
## Commands and aliases
|
||||
* Check if the CLN daemon is running:
|
||||
```
|
||||
sudo systemctl status lightningd
|
||||
```
|
||||
* Follow it's system output for debugging:
|
||||
```
|
||||
sudo journalctl -fu lightningd
|
||||
```
|
||||
* The logs can be accessed in the menu `SYSTEM` - `CLLOG`
|
||||
or with the alias: `cllog`
|
||||
* The frequently used commands are shortened with alisases. Check them with the command `alias`:
|
||||
```
|
||||
alias cl='sudo -u bitcoin /usr/local/bin/lightning-cli --conf=/home/bitcoin/.lightning/config'
|
||||
alias clconf='sudo nano /home/bitcoin/.lightning/config'
|
||||
alias cllog='sudo tail -n 30 -f /home/bitcoin/.lightning/bitcoin/cl.log'
|
||||
```
|
||||
|
||||
## Directories
|
||||
* All data is stored on the disk in:
|
||||
`/mnt/hdd/app-data/.lightningd`
|
||||
* and symlinked to:
|
||||
`/home/bitcoin/.lightningd`
|
||||
|
||||
## Config file
|
||||
* Edit in the menu `SYSTEM` - `CLNCONF` or use the alias `clconf`
|
||||
|
||||
### Default values
|
||||
* on the RaspiBlitz for mainnet
|
||||
```
|
||||
network=bitcoin
|
||||
log-file=cl.log
|
||||
log-level=info
|
||||
plugin-dir=/home/bitcoin/cln-plugins-enabled
|
||||
# Tor settings
|
||||
proxy=127.0.0.1:9050
|
||||
bind-addr=127.0.0.1:9736
|
||||
addr=statictor:127.0.0.1:9051/torport=9736
|
||||
always-use-proxy=true
|
||||
```
|
||||
* find [all the possible config options](#all-possible-config-options) below.
|
||||
|
||||
## Plug-ins
|
||||
|
||||
### General info
|
||||
* https://lightning.readthedocs.io/PLUGINS.html#a-day-in-the-life-of-a-plugin
|
||||
* https://github.com/lightningd/plugins/
|
||||
|
||||
### Directories
|
||||
* The plugins are installed to:
|
||||
`/home/bitcoin/cl-plugins-available`
|
||||
* and symlinked to:
|
||||
`/home/bitcoin/cl-plugins-enabled`
|
||||
* All plugins in the `/home/bitcoin/cl-plugins-enabled` directory are loaded automatically as set in the config file: `/home/bitcoin/.lightningd/config`
|
||||
|
||||
### Implemented plugins
|
||||
* summary
|
||||
* sparko
|
||||
* [CLBOSS](#clboss)
|
||||
* [feeadjuster](#feeadjuster)
|
||||
|
||||
### Add a custom plugin
|
||||
* Place the plugin in the `/home/bitcoin/cl-plugins-enabled` directory
|
||||
* Make sure it is owned by the `bitcoin` user and is executable:
|
||||
```
|
||||
sudo chown bitcoin:bitcoin /home/bitcoin/cl-plugins-enabled/PLUGIN_NAME
|
||||
sudo chmod +x /home/bitcoin/cl-plugins-enabled/PLUGIN_NAME
|
||||
```
|
||||
* start with
|
||||
```
|
||||
lightnign-cli plugin start /home/bitcoin/cl-plugins-enabled/PLUGIN_NAME
|
||||
```
|
||||
* or to load it automatically on restart:
|
||||
```
|
||||
sudo systemctl restart lightningd
|
||||
```
|
||||
From the directory `/home/bitcoin/cl-plugins-enabled` it will load auomatically after restarts.
|
||||
* To just load it run it once store in (and start from):
|
||||
`/home/bitcoin/cl-plugins-available/`
|
||||
|
||||
### CLBOSS
|
||||
A plugin for automatic LN node management.
|
||||
CLBOSS only requires to have funds deposited to the onchain wallet of CLN.
|
||||
The recommended amount to start is ~ 10 million satoshis (0.1 BTC).
|
||||
|
||||
It does automatically:
|
||||
|
||||
* generate outbound capacity - opens channels
|
||||
* generate inbound capacity - submarine swaps through the boltz.exchange API
|
||||
* aware of onchain fees and mempool through CLN and makes transactions when fees are low
|
||||
* manages rebalancing - performs probing
|
||||
* closes bad channels (inactive or low traffic) - this function needs to activated manually
|
||||
|
||||
Overall it is a tool which makes users able to send and receive lightning payments with minimal interaction, basically setting up a routing node by itself.
|
||||
|
||||
The transactions made by CLBOSS does cost money and running it requires a fair amount of trust in the (fully open-source - MIT) code.
|
||||
Neither the CLBOSS nor the RaspiBlitz developers can take resposibility for lost sats, use at your own discretion!
|
||||
|
||||
* Activate it in the menu - `SETTINGS` - `-CL CLBOSS`
|
||||
* Discussion: https://github.com/rootzoll/raspiblitz/issues/2490
|
||||
* Advanced usage
|
||||
https://github.com/ZmnSCPxj/clboss#clboss-status
|
||||
* Stopping CLBOSS will leave the node in the last state. No channels will be closed or funds removed when CLBOSS is uninstalled.
|
||||
* Check the running version:
|
||||
```
|
||||
/home/bitcoin/cl-plugins-enabled/clboss --version
|
||||
```
|
||||
|
||||
### Feeadjuster
|
||||
|
||||
* Install:
|
||||
`config.scripts/cl-plugin.feeadjuster.sh on`
|
||||
|
||||
* to set the default fees add to the CLN config file (`clconf`)
|
||||
```
|
||||
fee-base=BASEFEE_IN_MILLISATS
|
||||
fee-per-satoshi=PPM_FEE_IN_SATS
|
||||
```
|
||||
|
||||
* example feeadjuster options
|
||||
```
|
||||
fee-base=0
|
||||
fee-per-satoshi=200
|
||||
feeadjuster-imbalance=0.2
|
||||
feeadjuster-threshold=0.10
|
||||
feeadjuster-threshold-abs=0.01btc
|
||||
feeadjuster-enough-liquidity=1000000000msat
|
||||
feeadjuster-deactivate-fee-update
|
||||
feeadjuster-adjustment-method=hard
|
||||
```
|
||||
* effect displayed in the logs (`cllog`)
|
||||
```
|
||||
plugin-feeadjuster.py:
|
||||
Plugin feeadjuster initialized (0 base / 200 ppm) with an imbalance of 20%/80%,
|
||||
update_threshold: 10%, update_threshold_abs: 1000000000msat,
|
||||
enough_liquidity: 1000000000msat, deactivate_fuzz: None,
|
||||
forward_event_subscription: False, adjustment_method: get_ratio_hard,
|
||||
fee_strategy: get_fees_global, listchannels_by_dst: True
|
||||
```
|
||||
|
||||
* more options for the feeadjuster to be set in the CLN config can be seen in the [code](https://github.com/lightningd/plugins/blob/master/feeadjuster/feeadjuster.py#L323)
|
||||
|
||||
* start the feeadjuster
|
||||
```
|
||||
cl plugin start /home/bitcoin/cl-plugins-available/plugins/feeadjuster/feeadjuster.py
|
||||
```
|
||||
* stop (best to run only periodically)
|
||||
```
|
||||
cl plugin stop /home/bitcoin/cl-plugins-available/plugins/feeadjuster/feeadjuster.py
|
||||
```
|
||||
* Can use menu - `CL` - `SUEZ` to visualize the channel balances and fee settings
|
||||
* check the list of base fees
|
||||
```
|
||||
cl listpeers | grep fee_base_msat
|
||||
```
|
||||
* check the list of proportional fees
|
||||
```
|
||||
cl listpeers | grep fee_proportional_millionths
|
||||
```
|
||||
* set the fees to the defaults
|
||||
```
|
||||
cl setchannelfee all
|
||||
```
|
||||
|
||||
### Dual funded channels
|
||||
#### Reading
|
||||
* https://medium.com/blockstream/c-lightning-opens-first-dual-funded-mainnet-lightning-channel-ada6b32a527c
|
||||
* https://medium.com/blockstream/setting-up-liquidity-ads-in-c-lightning-54e4c59c091d
|
||||
* https://twitter.com/niftynei/status/1389328732377255938
|
||||
* lightning-rfc PR: https://github.com/lightningnetwork/lightning-rfc/pull/851/files
|
||||
* represented by the feature bits 28/29
|
||||
|
||||
#### Setting up
|
||||
* activate the feature on your node:
|
||||
Type: `clconf` or use the menu `SYSTEM` - `CLCONF`.
|
||||
Add the line:
|
||||
```
|
||||
experimental-dual-fund
|
||||
```
|
||||
Save and restart CLN.
|
||||
|
||||
* set up a liquidity ad:
|
||||
```
|
||||
lightning-cli funderupdate -k policy=match policy_mod=100
|
||||
```
|
||||
or set in the config for example - see the meaning of each line in https://medium.com/blockstream/setting-up-liquidity-ads-in-c-lightning-54e4c59c091d :
|
||||
|
||||
```
|
||||
experimental-dual-fund
|
||||
funder-policy=match
|
||||
funder-policy-mod=100
|
||||
lease-fee-base-msat=500sat
|
||||
lease-fee-basis=50
|
||||
channel-fee-max-base-msat=100sat
|
||||
channel-fee-max-proportional-thousandths=2
|
||||
```
|
||||
* check the settings used currently on your node:
|
||||
```
|
||||
lightning-cli funderupdate
|
||||
```
|
||||
* check your advertised settings (needs some minutes to appear):
|
||||
```
|
||||
lightning-cli listnodes $(lightning-cli getinfo | jq .id)
|
||||
```
|
||||
|
||||
#### Open a dual funded channel
|
||||
* check if a node has onchain liquidity on offer:
|
||||
```
|
||||
lightning-cli listnodes nodeid
|
||||
```
|
||||
|
||||
Example:
|
||||
```
|
||||
lightning-cli listnodes 02cca6c5c966fcf61d121e3a70e03a1cd9eeeea024b26ea666ce974d43b242e636
|
||||
```
|
||||
* list all nodes known in the graph with active offers:
|
||||
```
|
||||
lightning-cli listnodes | grep option_will_fund -B20 -A7
|
||||
```
|
||||
* note the node `id` and `compact_lease`
|
||||
|
||||
* connect to the node
|
||||
```
|
||||
lightning-cli connect nodeID@IP_or.onion
|
||||
```
|
||||
#### Fundchannel syntax
|
||||
* the amount is the own funds in the wallet contributed
|
||||
use equal amounts to have a balanced channel from start
|
||||
the amounts can be specified in `sat` or `btc`
|
||||
```
|
||||
lightning-cli fundchannel -k id=NODE_ID amount=OWN_AMOUNTsat request_amt=PEER_CONTRIBUTION_AMOUNTsat compact_lease=COMPACT_LEASE
|
||||
```
|
||||
It can fail if the offer changed or there are not enough funds available on either side.
|
||||
|
||||
* open a dual funded channel with a chosen utxo and miner feerate
|
||||
list the utxo-s with `lightning-cli listfunds`, can list multiple
|
||||
the feerate is in `perkb` by default, e.g. use 1000 for 1 sat/byte
|
||||
```
|
||||
lightning-cli fundchannel feerate=PERKB_FEERATE utxos='["TRANSACTION_ID:INDDEX_NUMBER"]' -k id=NODE_ID amount=OWN_AMOUNTsat request_amt=PEER_CONTRIBUTION_AMOUNTsat compact_lease=COMPACT_LEASE
|
||||
```
|
||||
|
||||
#### Multifundchannel syntax
|
||||
* discussed in https://github.com/ElementsProject/lightning/issues/4642#issuecomment-1149657371
|
||||
* see a good format (json autoformatting tools help - like `CTRL`+`SHIFT`+`i` in VSCode):
|
||||
```
|
||||
₿ lightning-cli multifundchannel '[
|
||||
{
|
||||
"id": "nodeID1",
|
||||
"amount": "amount_in_sats"
|
||||
},
|
||||
{
|
||||
"id": "nodeID2",
|
||||
"amount": "amount_in_sats"
|
||||
},
|
||||
{
|
||||
"id": "nodeID3",
|
||||
"amount": "amount_in_sats"
|
||||
},
|
||||
{
|
||||
"id": "nodeID4",
|
||||
"amount": "amount_in_sats",
|
||||
}
|
||||
]' 1000perkb
|
||||
```
|
||||
|
||||
* The returned output:
|
||||
```
|
||||
{
|
||||
"tx": "RAW............TX",
|
||||
"txid": "TX................ID",
|
||||
"channel_ids": [
|
||||
{
|
||||
"id": "nodeID1",
|
||||
"channel_id": "CHANNEL_ID2",
|
||||
"outnum": 3
|
||||
},
|
||||
{
|
||||
"id": "nodeID2",
|
||||
"channel_id": "CHANNEL_ID1",
|
||||
"outnum": 4
|
||||
},
|
||||
{
|
||||
"id": "nodeID3",
|
||||
"channel_id": "CHANNEL_ID4",
|
||||
"outnum": 1
|
||||
},
|
||||
{
|
||||
"id": "nodeID4",
|
||||
"channel_id": "CHANNEL_ID3",
|
||||
"outnum": 2
|
||||
}
|
||||
],
|
||||
"failed": []
|
||||
}
|
||||
```
|
||||
|
||||
### Offers
|
||||
* Details at bolt12.org
|
||||
* Create an offer to receive payments:
|
||||
https://lightning.readthedocs.io/lightning-offer.7.html
|
||||
```
|
||||
lightning-cli offer amount description [vendor] [label] [quantity_min] [quantity_max] [absolute_expiry] [recurrence] [recurrence_base] [recurrence_paywindow] [recurrence_limit] [single_use]
|
||||
```
|
||||
* Example:
|
||||
Create a reusable offer which can be paid with any amount for LN tips using a fixed string.
|
||||
```
|
||||
lightning-cli offer any tip
|
||||
```
|
||||
|
||||
* Create an offer to send payments:
|
||||
https://lightning.readthedocs.io/lightning-offerout.7.html
|
||||
```
|
||||
lightning-cli offerout amount description [vendor] [label] [absolute_expiry] [refund_for]
|
||||
```
|
||||
* Fetch an invoice to pay an offer:
|
||||
https://lightning.readthedocs.io/lightning-fetchinvoice.7.html
|
||||
Will need at least one peer which supports onion the messages. For example:
|
||||
```
|
||||
lightning-cli connect 024b9a1fa8e006f1e3937f65f66c408e6da8e1ca728ea43222a7381df1cc449605@128.199.202.168:9735
|
||||
```
|
||||
* Then use the command to fetch the BOLT12 invoice:
|
||||
```
|
||||
lightning-cli fetchinvoice offer [msatoshi] [quantity] [recurrence_counter] [recurrence_start] [recurrence_label] [timeout] [payer_note]
|
||||
```
|
||||
* decode a BOLT12 invoice:
|
||||
```
|
||||
lightning-cli decode bolt12_invoice
|
||||
```
|
||||
* pay a a BOLT12 invoice:
|
||||
Will need to pay through a peer which supports the onion messages which means you need at least one channel with such a node.
|
||||
```
|
||||
lightning-cli pay bolt12_invoice
|
||||
```
|
||||
* see if there is a new invoice is paid with:
|
||||
```
|
||||
lightning-cli listinvoices
|
||||
```
|
||||
The `pay_index` will increase as the offer gets reused.
|
||||
|
||||
### About the feature bits
|
||||
* https://bitcoin.stackexchange.com/questions/107484/how-can-i-decode-the-feature-string-of-a-lightning-node-with-bolt-9
|
||||
* Convert the hex number from `lightning-cli listpeers` to binary: https://www.binaryhexconverter.com/hex-to-binary-converter and count the position of the bits from the right.
|
||||
|
||||
## Testnets
|
||||
* for testnet and signet there are prefixes `t` and `s` used for the aliases, daemons and their own plugin directory names.
|
||||
* Testnet
|
||||
```
|
||||
# alias:
|
||||
tcl | tclconf | tcllog
|
||||
|
||||
# daemon service name:
|
||||
tlightningd
|
||||
|
||||
# config file:
|
||||
/home/bitcoin/.lightningd/testnet/config
|
||||
|
||||
# plugin directory:
|
||||
/home/bitcoin/tcl-plugins-enabled
|
||||
```
|
||||
* Signet
|
||||
```
|
||||
# aliases:
|
||||
scl | sclconf | scllog
|
||||
|
||||
# daemon service name:
|
||||
slightningd
|
||||
|
||||
# config file:
|
||||
/home/bitcoin/.lightningd/signet/config
|
||||
|
||||
# plugin directory:
|
||||
/home/bitcoin/scl-plugins-enabled
|
||||
```
|
||||
|
||||
## Backups
|
||||
* https://lightning.readthedocs.io/FAQ.html#how-to-backup-my-wallet
|
||||
* General details: https://lightning.readthedocs.io/BACKUP.html
|
||||
|
||||
### Backup strategy
|
||||
* discussed in https://github.com/rootzoll/raspiblitz/issues/2983
|
||||
|
||||
* store your seed (or the `hsm_secret` HEX) as text.
|
||||
* the channel database (`lightningd.sqlite3`) is replicated to the SDcard real-time.
|
||||
* can make a cl-rescue file from time-to-time so you have a backup of the onchain wallet (`hsm_secret` - generated from the seed) and the channel database (`lightningd.sqlite3` - can be restored as a last resort - will trigger force closes with the peers).
|
||||
|
||||
* A future CLN version will have an SCB like functionality, but will be stored automatically with the peers (encrypted over LN), see the PR: [ElementsProject/lightning#5361](https://github.com/ElementsProject/lightning/pull/5361)
|
||||
|
||||
### Seed
|
||||
* By default a BIP39 wordlist compatible, 24 words seed is used to generate the `hsm_secret`
|
||||
* If the wallet was generated or restored from seed on a RaspiBlitz the seed is stored in the disk with the option to encrypt
|
||||
* Display the seed from the menu - `CL` - `SEED`
|
||||
* The file where the seed is stored (until encrypted) is on the disk: `/home/bitcoin/.lightning/bitcoin/seedwords.info`
|
||||
* Show manually with:
|
||||
`sudo cat /home/bitcoin/.lightning/bitcoin/seedwords.info`
|
||||
* If there is no such file and you have not funded the CLN wallet yet can reset the wallet and the next wallet will be created with a seed.
|
||||
|
||||
### How to display the hsm_secret in a human-readable format?
|
||||
* If there is no seed available it is best to save the hsm_secret as a file with `scp` or note down the alphanumeric characters in the two line displayed with:
|
||||
```
|
||||
sudo xxd /home/bitcoin/.lightning/bitcoin/hsm_secret
|
||||
```
|
||||
|
||||
### How to test the seedwords?
|
||||
* The manual process:
|
||||
```
|
||||
# display the hsm_secret in hex:
|
||||
sudo -u bitcoin xxd /home/bitcoin/.lightning/bitcoin/hsm_secret
|
||||
|
||||
# input seed and generate an hsm_secret in a temporary location:
|
||||
lightning-hsmtool generatehsm /dev/shm/test_hsm_secret
|
||||
|
||||
# compare
|
||||
xxd /dev/shm/test_hsm_secret
|
||||
|
||||
# delete temp file
|
||||
srm /dev/shm/test_hsm_secret
|
||||
```
|
||||
### How to restore the hsm_secret from text?
|
||||
* example from https://lightning.readthedocs.io/BACKUP.html#backing-up-your-c-lightning-node:
|
||||
```
|
||||
cat > hsm_secret_hex.txt <<HEX
|
||||
00: 30cc f221 94e1 7f01 cd54 d68c a1ba f124
|
||||
10: e1f3 1d45 d904 823c 77b7 1e18 fd93 1676
|
||||
HEX
|
||||
xxd -r hsm_secret_hex.txt > hsm_secret
|
||||
|
||||
# move in place (will overwrite! - remove the ##)
|
||||
## sudo mv /home/bitcoin/.lightning/bitcoin/hsm_secret
|
||||
|
||||
# fix the owner and tighten permissions
|
||||
sudo chown bitcoin:bitcoin /home/bitcoin/.lightning/bitcoin/hsm_secret
|
||||
chmod 0400 /home/bitcoin/.lightning/bitcoin/hsm_secret
|
||||
```
|
||||
|
||||
### Channel database
|
||||
* Stored on the disk and synchronised to the SDcard with the help of the `backup` plugin.
|
||||
|
||||
### Recovery
|
||||
* https://lightning.readthedocs.io/FAQ.html#database-corruption-channel-state-lost
|
||||
* https://lightning.readthedocs.io/FAQ.html#loss
|
||||
#### Recover from a cl-rescue file
|
||||
* use the `REPAIR-CL` - `FILERESTORE` option in the menu for instructions to upload
|
||||
|
||||
#### Recover from a seed
|
||||
* use the `REPAIR-CL` - `SEEDRESTORE` option in the menu for instructions to paste the seedwords to restore
|
||||
|
||||
#### Restore a CLN node from the database backup on the SDcard
|
||||
* https://gist.github.com/openoms/3516cd8f393d69d52f858c3d47c9e469
|
||||
|
||||
#### Rescan the chain after restoring a used CLN wallet
|
||||
|
||||
* can use the `menu` -> `REPAIR` -> `REPAIR-CL` -> `RESCAN` option
|
||||
* or follow the manual process:
|
||||
<https://lightning.readthedocs.io/FAQ.html#rescanning-the-block-chain-for-lost-utxos>
|
||||
```
|
||||
# stop `lightningd`:
|
||||
sudo systemctl stop lightningd
|
||||
|
||||
# the ungraceful method:
|
||||
sudo killall ligthningd
|
||||
|
||||
# Rescan from the block 700000
|
||||
sudo -u bitcoin lightningd --rescan -700000 --log-level debug
|
||||
|
||||
# Rescan the last 1000 blocks:
|
||||
sudo -u bitcoin lightningd --rescan 1000 --log-level debug
|
||||
```
|
||||
* can monitor in a new window using the shortcut:
|
||||
```
|
||||
cllog
|
||||
```
|
||||
|
||||
#### Guesstoremote to recover funds from force-closed channels
|
||||
* <https://lightning.readthedocs.io/lightning-hsmtool.8.html>
|
||||
```
|
||||
$ man lightning-hsmtool
|
||||
guesstoremote p2wpkh node_id max_channel_dbid hsm_secret [password]
|
||||
Brute-force the private key to our funds from a remote unilateral close of a channel, in a case where we have lost all database data except for our hsm_secret. The peer must be the one to close the channel (and the funds will remain unrecoverable until the channel is closed). max_channel_dbid is your own guess on what the channel_dbid was, or at least the maximum possible value, and is usually no greater than the number of channels that the node has ever had. Specify password if the hsm_secret is encrypted.
|
||||
```
|
||||
* Usage on the RaspiBlitz (example for mainnet):
|
||||
```
|
||||
sudo -u bitcoin lightning-hsmtool guesstoremote p2wpkh-ADDRESS-bc1... PEER_NODE_ID 5000 /home/bitcoin/.lightning/bitcoin/hsm_secret
|
||||
```
|
||||
* The `p2wpkh-ADDRESS-bc1...` must a be a non-timelocked output. Shows with `OP_PUSHBYTES_20` in block explorers.
|
||||
* The `max_channel_dbid` = 5000 is usually plenty, can set any higher number
|
||||
* If the `hsm_secret` is encrypted give the password on the end
|
||||
|
||||
* Output if unsuccessful (the private key is not known):
|
||||
```
|
||||
Could not find any basepoint matching the provided witness programm.
|
||||
Are you sure that the channel used `option_static_remotekey` ?
|
||||
*** stack smashing detected ***: terminated
|
||||
Aborted
|
||||
```
|
||||
* Output if successful:
|
||||
```
|
||||
bech32 : bc1q......................................
|
||||
pubkey hash : 0123456789abcdef0123456789abcdef01234567
|
||||
pubkey : 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01
|
||||
privkey : 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
|
||||
```
|
||||
* To import the private key of the address in Electrum Wallet will need to convert to base58
|
||||
```
|
||||
git clone https://github.com/matja/bitcoin-tool
|
||||
cd bitcoin-tool
|
||||
make test
|
||||
|
||||
./bitcoin-tool \
|
||||
--network bitcoin \
|
||||
--input-type private-key \
|
||||
--input-format hex \
|
||||
--input PASTE_THE_privkey_HERE \
|
||||
--output-type private-key-wif \
|
||||
--output-format base58check \
|
||||
--public-key-compression compressed
|
||||
```
|
||||
* Example output:
|
||||
```
|
||||
KwFvTne98E1t3mTNAr8pKx67eUzFJWdSNPqPSfxMEtrueW7PcQzL
|
||||
```
|
||||
* To import to teh Electrum Wallet use the `p2wpkh:` prefix:
|
||||
<https://bitcoinelectrum.com/importing-your-private-keys-into-electrum/>
|
||||
```
|
||||
p2wpkh:KxacygL6usxP8T9cFSM2SRW5QsEg66bUQUEn997UWwCZANEe7NLT
|
||||
```
|
||||
|
||||
## sqlite3 queries
|
||||
* Query the reasons for force closes
|
||||
```
|
||||
sudo -u bitcoin sqlite3 /home/bitcoin/.lightning/bitcoin/lightningd.sqlite3 'select short_channel_id, timestamp, cause, message from channel_state_changes inner join channels on channel_id = id where new_state = 7 order by timestamp'
|
||||
```
|
||||
* Query the reasons for cooperative channel closes
|
||||
```
|
||||
sudo -u bitcoin sqlite3 /home/bitcoin/.lightning/bitcoin/lightningd.sqlite3 'select short_channel_id, timestamp, cause, message from channel_state_changes inner join channels on channel_id = id where new_state = 4 order by timestamp'
|
||||
```
|
||||
|
||||
## Update
|
||||
### Update to a new CLN release
|
||||
* See the tagged releases by the CLN team: [github.com/ElementsProject/lightning/releases](https://github.com/ElementsProject/lightning/releases)
|
||||
* Will be able to update to new releases from the menu - `UPDATE` - `CL`
|
||||
* Since downgrading the lightning database is not allowed the updated version will persist if the SDcard is reflashed.
|
||||
|
||||
### Experimental update to the latest master
|
||||
* this won't persist in case the SDcard is reflashed so will need to manually update again.
|
||||
* the commadn to use the built-in script to update to the lates commit in the default branch is:
|
||||
```
|
||||
config.scripts/cl.install.sh update
|
||||
```
|
||||
* if the database version is not compatible with the default version after a downgrade there will be an error message in `sudo journalctl -u lightningd` similar to:
|
||||
```
|
||||
Refusing to migrate down from version 178 to 176
|
||||
```
|
||||
* in this case update to the next release from the menu or the latest master again with:
|
||||
```
|
||||
config.scripts/cl.install.sh update
|
||||
```
|
||||
|
||||
## sqlite3 queries
|
||||
* Query the reasons for force closes
|
||||
```
|
||||
sudo -u bitcoin sqlite3 /home/bitcoin/.lightning/bitcoin/lightningd.sqlite3 'select short_channel_id, timestamp, cause, message from channel_state_changes inner join channels on channel_id = id where new_state = 7 order by timestamp'
|
||||
```
|
||||
|
||||
* Query the reasons for cooperative channel closes
|
||||
```
|
||||
sudo -u bitcoin sqlite3 /home/bitcoin/.lightning/bitcoin/lightningd.sqlite3 'select short_channel_id, timestamp, cause, message from channel_state_changes inner join channels on channel_id = id where new_state = 4 order by timestamp'
|
||||
```
|
||||
|
||||
## Script file help list
|
||||
* generate a list of the help texts on a RaspiBlitz:
|
||||
```
|
||||
cd /home/admin/config.scripts/
|
||||
ls cl*.sh > clScriptList.txt
|
||||
sed -i 's#^#./#g' clScriptList.txt
|
||||
sed -i 's#.sh#.sh -h#g' clScriptList.txt
|
||||
bash -x clScriptList.txt
|
||||
rm clScriptList.txt
|
||||
```
|
||||
|
||||
```
|
||||
+ ./cl.backup.sh -h
|
||||
|
||||
---------------------------------------------------
|
||||
CL RESCUE FILE (tar.gz of complete cl directory)
|
||||
---------------------------------------------------
|
||||
cl.backup.sh cl-export
|
||||
cl.backup.sh cl-export-gui
|
||||
cl.backup.sh cl-import [file]
|
||||
cl.backup.sh cl-import-gui [setup|production] [?resultfile]
|
||||
---------------------------------------------------
|
||||
SEED WORDS
|
||||
---------------------------------------------------
|
||||
cl.backup.sh seed-export-gui [clseeddata]
|
||||
cl.backup.sh seed-import-gui [resultfile]
|
||||
---------------------------------------------------
|
||||
RECOVERY
|
||||
---------------------------------------------------
|
||||
cl.backup.sh [mainnet|signet|testnet] recoverymode [on|off|status] <-rescanbockheight|rescandepth>
|
||||
|
||||
+ ./cl.check.sh -h
|
||||
|
||||
# script to check CL states
|
||||
# cl.check.sh basic-setup
|
||||
# cl.check.sh prestart [mainnet|testnet|signet]
|
||||
|
||||
+ ./cl.hsmtool.sh -h
|
||||
|
||||
Create new wallet or import seed
|
||||
Unlock/lock, encrypt, decrypt, set autounlock or change password for the hsm_secret
|
||||
|
||||
Usage:
|
||||
Create new wallet:
|
||||
cl.hsmtool.sh [new] [mainnet|testnet|signet] [?seedpassword]
|
||||
cl.hsmtool.sh [new-force] [mainnet|testnet|signet] [?seedpassword]
|
||||
There will be no seedpassword(passphrase) used by default
|
||||
new-force will backup the old wallet and will work without interaction
|
||||
|
||||
cl.hsmtool.sh [seed] [mainnet|testnet|signet] ["space-separated-seed-words"] [?seedpassword]
|
||||
cl.hsmtool.sh [seed-force] [mainnet|testnet|signet] ["space-separated-seed-words"] [?seedpassword]
|
||||
The new hsm_secret will be not encrypted if no NewPassword is given
|
||||
seed-force will delete any old wallet and will work without dialog
|
||||
|
||||
cl.hsmtool.sh [unlock] <mainnet|testnet|signet> <password>
|
||||
success: exit 0
|
||||
wrong password: exit 2
|
||||
fail to unlock after 1 minute + show logs: exit 3
|
||||
cl.hsmtool.sh [lock] <mainnet|testnet|signet>
|
||||
cl.hsmtool.sh [encrypt|decrypt] <mainnet|testnet|signet>
|
||||
cl.hsmtool.sh [autounlock-on|autounlock-off] <mainnet|testnet|signet>
|
||||
|
||||
cl.hsmtool.sh [change-password] <mainnet|testnet|signet> <NewPassword>
|
||||
|
||||
+ ./cl.install-service.sh -h
|
||||
|
||||
Script to set up or update the Core Lightning systemd service
|
||||
Usage:
|
||||
/home/admin/config.scripts/cl.install-service.sh <mainnet|testnet|signet>
|
||||
|
||||
+ ./cl.install.sh -h
|
||||
|
||||
Core Lightning install script
|
||||
The default version is: v0.11.2
|
||||
mainnet / testnet / signet instances can run parallel
|
||||
|
||||
Usage:
|
||||
cl.install.sh install - called by build_sdcard.sh
|
||||
cl.install.sh on <mainnet|testnet|signet>
|
||||
cl.install.sh off <mainnet|testnet|signet> <purge>
|
||||
cl.install.sh [update <version>|testPR <PRnumber>]
|
||||
cl.install.sh display-seed <mainnet|testnet|signet>
|
||||
|
||||
+ ./cl.monitor.sh -h
|
||||
monitor and troubleshot the c-lightning network
|
||||
cl.monitor.sh [mainnet|testnet|signet] status
|
||||
cl.monitor.sh [mainnet|testnet|signet] config
|
||||
cl.monitor.sh [mainnet|testnet|signet] info
|
||||
cl.monitor.sh [mainnet|testnet|signet] wallet
|
||||
+ ./cl-plugin.backup.sh -h
|
||||
|
||||
Install the backup plugin for Core Lightning
|
||||
Replicates the lightningd.sqlite3 database on the SDcard
|
||||
|
||||
Usage:
|
||||
cl-plugin.backup.sh [on|off] [testnet|mainnet|signet]
|
||||
cl-plugin.backup.sh [restore] [testnet|mainnet|signet] [force]
|
||||
cl-plugin.backup.sh [backup-compact] [testnet|mainnet|signet]
|
||||
|
||||
https://github.com/lightningd/plugins/tree/master/backup
|
||||
|
||||
+ ./cl-plugin.clboss.sh -h
|
||||
|
||||
Install or remove the CLBOSS Core Lightning plugin
|
||||
version: v0.13A
|
||||
Usage:
|
||||
cl-plugin.clboss.sh [on|off] [testnet|mainnet|signet]
|
||||
cl-plugin.clboss.sh [info]
|
||||
|
||||
+ ./cl-plugin.cln-grpc.sh -h
|
||||
|
||||
Install the cln-grpc plugin for CLN
|
||||
Usage:
|
||||
cl-plugin.cln-grpc.sh install - called by build_sdcard.sh
|
||||
cl-plugin.cln-grpc.sh on <testnet|mainnet|signet>
|
||||
cl-plugin.cln-grpc.sh off <testnet|mainnet|signet> <purge>
|
||||
cl-plugin.cln-grpc.sh status <testnet|mainnet|signet>
|
||||
cl-plugin.cln-grpc.sh update <source>
|
||||
|
||||
+ ./cl-plugin.feeadjuster.sh -h
|
||||
|
||||
Install the feeadjuster plugin for Core Lightning
|
||||
Usage:
|
||||
cl-plugin.feeadjuster.sh [on|off] <testnet|mainnet|signet>
|
||||
|
||||
+ ./cl-plugin.http.sh -h
|
||||
|
||||
Install, remove, connect the c-lightning-http-plugin
|
||||
version: 1dbb6537e0ec5fb9b8edde10db6b4cc613ccdb19
|
||||
Implemented for mainnet only.
|
||||
Usage:
|
||||
cl-plugin.http.sh [on|off|connect] <norestart>
|
||||
|
||||
+ ./cl-plugin.sparko.sh -h
|
||||
|
||||
Install, remove, connect or get info about the Sparko plugin for Core Lightning
|
||||
version: v2.8
|
||||
Usage:
|
||||
cl-plugin.sparko.sh [on|off|menu|connect] [testnet|mainnet|signet] [norestart]
|
||||
|
||||
+ ./cl-plugin.standard-python.sh -h
|
||||
|
||||
Install and show the output of the chosen plugin for Core Lightning
|
||||
Usage:
|
||||
cl-plugin.standard-python.sh on [plugin-name] <testnet|mainnet|signet> <persist|runonce>
|
||||
|
||||
tested plugins:
|
||||
summary | helpme | feeadjuster | paytest
|
||||
|
||||
find more at:
|
||||
https://github.com/lightningd/plugins
|
||||
|
||||
+ ./cl-plugin.summary.sh -h
|
||||
|
||||
Install and show the output if the summary plugin for Core Lightning
|
||||
Usage:
|
||||
cl-plugin.summary.sh [testnet|mainnet|signet] [runonce]
|
||||
|
||||
+ ./cl.rest.sh -h
|
||||
|
||||
Core Lightning-REST install script
|
||||
The default version is: v0.7.2
|
||||
mainnet | testnet | signet instances can run parallel
|
||||
|
||||
Usage:
|
||||
cl.rest.sh [on|off|connect] <mainnet|testnet|signet> [?key-value]
|
||||
|
||||
+ ./cl.setname.sh -h
|
||||
|
||||
Config script to set the alias of the Core Lightning node
|
||||
cl.setname.sh [mainnet|testnet|signet] [?newName]
|
||||
|
||||
+ ./cl.spark.sh -h
|
||||
|
||||
Install, remove or get info about the Spark Wallet for Core Lightning
|
||||
version: v0.3.1
|
||||
Usage:
|
||||
cl.spark.sh [on|off|menu] <testnet|mainnet|signet>
|
||||
|
||||
+ ./cl.update.sh -h
|
||||
|
||||
Interim optional Core Lightning updates between RaspiBlitz releases.
|
||||
cl.update.sh [info|verified|reckless]
|
||||
info -> get actual state and possible actions
|
||||
verified -> only do recommended updates by RaspiBlitz team
|
||||
binary will be checked by signature and checksum
|
||||
reckless -> if you just want to update to the latest release
|
||||
published on Core Lightning GitHub releases (RC or final) without any
|
||||
testing or security checks.
|
||||
```
|
||||
|
||||
## All possible config options
|
||||
* can be shown by running:
|
||||
`lightningd --help`
|
||||
* To persist the setings place the options in the config file without the `--` and restart lightningd
|
||||
```
|
||||
Usage: lightningd
|
||||
A bitcoin lightning daemon (default values shown for network: bitcoin).
|
||||
--conf=<file> Specify configuration file
|
||||
--lightning-dir=<dir> Set base directory: network-specific subdirectory is under here (default: "/home/admin/.lightning")
|
||||
--network <arg> Select the network parameters (bitcoin, testnet, signet, regtest, litecoin or litecoin-testnet) (default: bitcoin)
|
||||
--mainnet Alias for --network=bitcoin
|
||||
--testnet Alias for --network=testnet
|
||||
--signet Alias for --network=signet
|
||||
--allow-deprecated-apis <arg> Enable deprecated options, JSONRPC commands, fields, etc. (default: true)
|
||||
--rpc-file <arg> Set JSON-RPC socket (or /dev/tty) (default: "lightning-rpc")
|
||||
--plugin <arg> Add a plugin to be run (can be used multiple times)
|
||||
--plugin-dir <arg> Add a directory to load plugins from (can be used multiple times)
|
||||
--clear-plugins Remove all plugins added before this option
|
||||
--disable-plugin <arg> Disable a particular plugin by filename/name
|
||||
--important-plugin <arg> Add an important plugin to be run (can be used multiple times). Die if the plugin dies.
|
||||
--always-use-proxy <arg> Use the proxy always (default: false)
|
||||
--daemon Run in the background, suppress stdout/stderr
|
||||
--wallet <arg> Location of the wallet database.
|
||||
--large-channels|--wumbo Allow channels larger than 0.16777215 BTC
|
||||
--experimental-dual-fund experimental: Advertise dual-funding and allow peers to establish channels via v2 channel open protocol.
|
||||
--experimental-onion-messages EXPERIMENTAL: enable send, receive and relay of onion messages
|
||||
--experimental-offers EXPERIMENTAL: enable send and receive of offers (also sets experimental-onion-messages)
|
||||
--experimental-shutdown-wrong-funding EXPERIMENTAL: allow shutdown with alternate txids
|
||||
--help|-h Print this message.
|
||||
--rgb <arg> RRGGBB hex color for node
|
||||
--alias <arg> Up to 32-byte alias for node
|
||||
--pid-file=<file> Specify pid file (default: "/home/admin/.lightning/lightningd-bitcoin.pid")
|
||||
--ignore-fee-limits <arg> (DANGEROUS) allow peer to set any feerate (default: false)
|
||||
--watchtime-blocks <arg> Blocks before peer can unilaterally spend funds (default: 144)
|
||||
--max-locktime-blocks <arg> Maximum blocks funds may be locked for (default: 2016)
|
||||
--funding-confirms <arg> Confirmations required for funding transaction (default: 3)
|
||||
--cltv-delta <arg> Number of blocks for cltv_expiry_delta (default: 34)
|
||||
--cltv-final <arg> Number of blocks for final cltv_expiry (default: 18)
|
||||
--commit-time=<millseconds> Time after changes before sending out COMMIT (default: 10)
|
||||
--fee-base <arg> Millisatoshi minimum to charge for HTLC (default: 1000)
|
||||
--rescan <arg> Number of blocks to rescan from the current head, or absolute blockheight if negative (default: 15)
|
||||
--fee-per-satoshi <arg> Microsatoshi fee for every satoshi in HTLC (default: 10)
|
||||
--htlc-minimum-msat <arg> The default minimal value an HTLC must carry in order to be forwardable for new channels
|
||||
--htlc-maximum-msat <arg> The default maximal value an HTLC must carry in order to be forwardable for new channel
|
||||
--max-concurrent-htlcs <arg> Number of HTLCs one channel can handle concurrently. Should be between 1 and 483 (default: 30)
|
||||
--max-dust-htlc-exposure-msat <arg> Max HTLC amount that can be trimmed
|
||||
--min-capacity-sat <arg> Minimum capacity in satoshis for accepting channels (default: 10000)
|
||||
--addr <arg> Set an IP address (v4 or v6) to listen on and announce to the network for incoming connections
|
||||
--bind-addr <arg> Set an IP address (v4 or v6) to listen on, but not announce
|
||||
--announce-addr <arg> Set an IP address (v4 or v6) or .onion v3 to announce, but not listen on
|
||||
--disable-ip-discovery Turn off announcement of discovered public IPs
|
||||
--offline Start in offline-mode (do not automatically reconnect and do not accept incoming connections)
|
||||
--autolisten <arg> If true, listen on default port and announce if it seems to be a public interface (default: true)
|
||||
--proxy <arg> Set a socks v5 proxy IP address and port
|
||||
--tor-service-password <arg> Set a Tor hidden service password
|
||||
--experimental-accept-extra-tlv-types <arg> Comma separated list of extra TLV types to accept.
|
||||
--disable-dns Disable DNS lookups of peers
|
||||
--encrypted-hsm Set the password to encrypt hsm_secret with. If no password is passed through command line, you will be prompted to enter it.
|
||||
--rpc-file-mode <arg> Set the file mode (permissions) for the JSON-RPC socket (default: "0600")
|
||||
--force-feerates <arg> Set testnet/regtest feerates in sats perkw, opening/mutual_close/unlateral_close/delayed_to_us/htlc_resolution/penalty: if fewer specified, last number applies to remainder
|
||||
--subdaemon <arg> Arg specified as SUBDAEMON:PATH. Specifies an alternate subdaemon binary. If the supplied path is relative the subdaemon binary is found in the working directory. This option may be
|
||||
specified multiple times. For example, --subdaemon=hsmd:remote_signer would use a hypothetical remote signing subdaemon.
|
||||
--experimental-websocket-port <arg> experimental: alternate port for peers to connect using WebSockets (RFC6455)
|
||||
--log-level <arg> log level (io, debug, info, unusual, broken) [:prefix] (default: info)
|
||||
--log-timestamps <arg> prefix log messages with timestamp (default: true)
|
||||
--log-prefix <arg> log prefix (default: lightningd)
|
||||
--log-file=<file> log to file instead of stdout
|
||||
--version|-V Print version and exit
|
||||
--autocleaninvoice-cycle <arg> Perform cleanup of expired invoices every given seconds, or do not autoclean if 0
|
||||
--autocleaninvoice-expired-by <arg> If expired invoice autoclean enabled, invoices that have expired for at least this given seconds are cleaned
|
||||
--fetchinvoice-noconnect Don't try to connect directly to fetch an invoice.
|
||||
--disable-mpp Disable multi-part payments.
|
||||
--bitcoin-datadir <arg> -datadir arg for bitcoin-cli
|
||||
--bitcoin-cli <arg> bitcoin-cli pathname
|
||||
--bitcoin-rpcuser <arg> bitcoind RPC username
|
||||
--bitcoin-rpcpassword <arg> bitcoind RPC password
|
||||
--bitcoin-rpcconnect <arg> bitcoind RPC host to connect to
|
||||
--bitcoin-rpcport <arg> bitcoind RPC host's port
|
||||
--bitcoin-retry-timeout <arg> how long to keep retrying to contact bitcoind before fatally exiting
|
||||
--commit-fee <arg> Percentage of fee to request for their commitment
|
||||
--funder-policy <arg> Policy to use for dual-funding requests. [match, available, fixed]
|
||||
--funder-policy-mod <arg> Percent to apply policy at (match/available); or amount to fund (fixed)
|
||||
--funder-min-their-funding <arg> Minimum funding peer must open with to activate our policy
|
||||
--funder-max-their-funding <arg> Maximum funding peer may open with to activate our policy
|
||||
--funder-per-channel-min <arg> Minimum funding we'll add to a channel. If we can't meet this, we don't fund
|
||||
--funder-per-channel-max <arg> Maximum funding we'll add to a channel. We cap all contributions to this
|
||||
--funder-reserve-tank <arg> Amount of funds we'll always leave available.
|
||||
--funder-fuzz-percent <arg> Percent to fuzz the policy contribution by. Defaults to 0%. Max is 100%
|
||||
--funder-fund-probability <arg> Percent of requests to consider. Defaults to 100%. Setting to 0% will disable dual-funding
|
||||
--funder-lease-requests-only <arg> Only fund lease requests. Defaults to true if channel lease rates are being advertised
|
||||
--lease-fee-base-sat <arg> Channel lease rates, base fee for leased funds, in satoshi.
|
||||
--lease-fee-base-msat <arg> Channel lease rates, base fee for leased funds, in satoshi.
|
||||
--lease-fee-basis <arg> Channel lease rates, basis charged for leased funds (per 10,000 satoshi.)
|
||||
--lease-funding-weight <arg> Channel lease rates, weight we'll ask opening peer to pay for in funding transaction
|
||||
--channel-fee-max-base-msat <arg> Channel lease rates, maximum channel fee base we'll charge for funds routed through a leased channel.
|
||||
--channel-fee-max-proportional-thousandths <arg> Channel lease rates, maximum proportional fee (in thousandths, or ppt) we'll charge for funds routed through a leased channel. Note: 1ppt = 1,000ppm
|
||||
```
|
187
FAQ.dev.md
@ -1,187 +0,0 @@
|
||||
## FAQ Development
|
||||
|
||||
### What is the process of creating a new SD card image release?
|
||||
|
||||
Work notes for the process of producing a new SD card image release:
|
||||
|
||||
* Make sure you have the "Versioning" final in your RaspiBlitz Source Code
|
||||
* Start [`Ubuntu LIVE`](http://releases.ubuntu.com/18.04.3/ubuntu-18.04.3-desktop-amd64.iso) from USB stick
|
||||
* Under Settings: best to set correct keyboard language & power settings to prevent monitor turn off
|
||||
* Connect to a secure WiFi (hardware switch on) or LAN
|
||||
* Download the latest RaspiOS-64bit (zip/xz & sig file) namend in the [build_sdcard.sh](./build_sdcard.sh) and note the SHA256 checksum
|
||||
* From the browser `Show All Downloads` and from the context menu select `Open Containing Folder`
|
||||
* On that file manager open context (right click) on the white-space and select `Open in Terminal`
|
||||
* Compare the checksum with the one you just made note of, using `shasum -a 256 *.zip`
|
||||
* Install curl if needed `sudo apt-get install -f curl net-tools`
|
||||
* Check signature: `curl https://www.raspberrypi.org/raspberrypi_downloads.gpg.key | gpg --import && gpg --verify *.sig`
|
||||
* The result should say "correct signature" and the fingerprint should end with `8738 CD6B 956F 460C`
|
||||
* Insert an NTFS formatted USB stick and use the file manager to move all files to the USB
|
||||
* If image is an ZIP file use in file manager context on NTFS USB stick `extract here` to unzip
|
||||
* Download script for later with `curl https://raw.githubusercontent.com/Drewsif/PiShrink/master/pishrink.sh > pishrink.sh`
|
||||
* Connect SD card reader with a SD card (16GB recommended)
|
||||
* In the file manager open context on the .img-file, select `Open With Disk Image Writer` and write the image to the SD card
|
||||
* In the file manager open context on `boot` drive free space `open in terminal`
|
||||
* Run the commands `touch ssh`
|
||||
* Run the command: `echo "pi:\$6\$TE7HmruYY9EaNiKP\$Vz0inJ6gaoJgJvQrC5z/HMDRMTN2jKhiEnG83tc1Jsw7lli5MYdeA83g3NOVCsBaTVW4mUBiT/1ZRWYdofVQX0" > userconf` and `exit`
|
||||
* Eject the `boot` and the `NTFS` volume
|
||||
* Connect a RaspiBlitz (without HDD) to network, insert sd card and power up
|
||||
* Find the IP of the RaspiBlitz (arp -a or check router)
|
||||
* In terminal `ssh pi@[IP-OF-RASPIBLITZ]`
|
||||
* Password is `raspberry`
|
||||
* Run the following command BUT REPLACE `[BRANCH]` with the branch-string of your latest version
|
||||
* `wget --no-cache https://raw.githubusercontent.com/rootzoll/raspiblitz/[BRANCH]/build_sdcard.sh && sudo bash build_sdcard.sh -b [BRANCH]`
|
||||
* Monitor/Check outputs for warnings/errors - install LCD
|
||||
* Login new with `ssh admin@[IP-OF-RASPIBLITZ]` (pw: raspiblitz) and run `release`
|
||||
* Disconnect WiFi/LAN on build laptop (hardware switch off) and shutdown
|
||||
* Remove `Ubuntu LIVE` USB stick and cut power from the RaspberryPi
|
||||
* Connect USB stick with latest `TAILS` (make it stay offline)
|
||||
* Boot Tails with extra setting of Admin-Passwort and remember (use later for sudo)
|
||||
* Menu > Systemtools > Settings > Energy -> best to set monitor to never turn off
|
||||
* Connect USB stick with GPG signing keys - decrypt drive if needed
|
||||
* Open Terminal and cd into directory of USB Stick under `/media/amnesia`
|
||||
* Run `gpg --import ./sub.key`, check and `exit`
|
||||
* Disconnect USB stick with GPG keys
|
||||
* Take the SD card from the RaspberryPi and connect with an external SD card reader to the laptop
|
||||
* Click on `boot` volume once in the file manger
|
||||
* Connect the NTFS USB stick, open in file manager and delete old files
|
||||
* Open Terminal and cd into directory of NTFS USB stick under `/media/amnesia`
|
||||
* `shasum -a 256 ./pishrink.sh` should be `e46e1e1e3c6e3555f9fff5435e2305e99b98aaa8dc28db1814cf861fbb472a69`
|
||||
* if not: review changes in latest pishrink script
|
||||
* Run `df` to check on the SD card device name (`boot` - ignore last partition number)
|
||||
* `dd if=/dev/[sdcarddevice] of=./raspiblitz.img`
|
||||
* `chmod +x ./pishrink.sh | sudo ./pishrink.sh ./raspiblitz.img`
|
||||
* `gzip -c ./raspiblitz.img > ./raspiblitz-vX.X-YEAR-MONTH-DAY.img.gz`
|
||||
* Then run `shasum -a 256 *.gz > sha256.txt`
|
||||
* Sign with `gpg --output raspiblitz-vX.X-YEAR-MONTH-DAY.img.gz.sig --detach-sign *.gz`
|
||||
* Shutdown build computer
|
||||
* Connect the NTFS USB stick to MacOS (it is just read-only)
|
||||
* Run tests on the new image
|
||||
* Upload the new image to the Download Server - put sig-file next to it
|
||||
* Copy SHA256-String into GitHub README and update the download link
|
||||
* Create Torrent file from image (for example with Transmission) and place in in the `home.admin/assets` folder & link on README
|
||||
|
||||
This is a recommended tracker list to be used with the torrent:
|
||||
```
|
||||
udp://tracker.coppersurfer.tk:6969/announce
|
||||
http://tracker.yoshi210.com:6969/announce
|
||||
http://open.acgtracker.com:1096/announce
|
||||
http://tracker.skyts.net:6969/announce
|
||||
udp://9.rarbg.me:2780/announce
|
||||
http://tracker2.itzmx.com:6961/announce
|
||||
udp://exodus.desync.com:6969/announce
|
||||
http://pow7.com:80/announce
|
||||
udp://tracker.leechers-paradise.org:6969
|
||||
```
|
||||
|
||||
### Versioning
|
||||
|
||||
* Major Updates: 1.0.0, 2.0.0, 3.0.0, ... are epic updates signaling that the software reached a new era.
|
||||
* Main Updates: 1.1.0, 1.2.0, 1.3.0, ... are breaking updates - the reflashing of the sd ard is mandatory.
|
||||
* Minor Updates: 1.3.0, 1.3.1, 1.3.2, ... are soft updates - can be done by 'patching' the scripts & code, but new sd card reflash is still advised.
|
||||
|
||||
### How can I customize my RaspiBlitz or add other software?
|
||||
|
||||
The RaspiBlitz is your computer to experiment with. Feel free to add your own scripts, edit the system or install further software from the command line. Just keep in mind that after an update/recovery the RaspiBlitz starts with a fresh and clean operating system again. So all your editings and installs might be gone. To prevent this you should do the following:
|
||||
|
||||
- place your own scripts and data that should survive an update/recovery into the `/mnt/hdd/app-data` directory
|
||||
- put all install commands & modification of the system into the script `/mnt/hdd/app-data/custom-installs.sh` which will be started automatically on a recovery/update.
|
||||
|
||||
### GitHub Workflow
|
||||
|
||||
- Development is done on the 'dev' branch, new features should be done on single feature branches and merged into 'dev' once ready.
|
||||
- When a release of a new main-update (see above) comes closer, a new release branch gets created from 'dev' with the first release candidate - the RCs and the final release sd card will be build from this branch.
|
||||
- All minor-releases will basically all work with the same 'build_sdcard.sh' script so that the code could be updated by just calling 'patch'. Emergency updates on lnd & bitcoin may break this guideline, but basic structure & packaging should stay mostly consistent over a main-update version.
|
||||
- Once a release is ready, that release branch will be set as the "default" branch on GitHub (so its shown as main page)
|
||||
- Hot fixes & new features for minor verisons will be created as single branches from the release branch, and once ready will be merged back into that release branch as a Pull Request using 'Squash-Merge' AND then, this 'Squash-Merge' (one single commit) will get cherry-picked into the 'dev' branch ('git cherry-pick COMMITHASH' - may call 'git fetch' & 'git pull' before to make a clean cherry-pick into dev).
|
||||
|
||||
### Can I run RaspiBlitz on other computers than RaspberryPi?
|
||||
|
||||
There is an experimental section in this GitHub that tries to build for other SingleBoardComputers. Feel free to try it out and share your experience: [alternative.platforms/README.md](alternative.platforms/README.md)
|
||||
|
||||
### How can I build an SD card from another branch?
|
||||
|
||||
There might be new, but not released features in development that are not yet in the default version branch - but you want to try them out.
|
||||
|
||||
To build a SD card image from another branch than master, you follow the [Build the SD Card Image](README.md#build-the-sd-card-image) from the README, but execute the build script from the other branch and add the name of that branch as a parameter to the build script.
|
||||
|
||||
For example if you want to make a build from the 'dev' branch you execute the following command:
|
||||
|
||||
`wget --no-cache https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/build_sdcard.sh && sudo bash build_sdcard.sh -b dev`
|
||||
|
||||
If you want to see all the optional parameters for building your sd card, just answere `no` on first question and call `sudo bash build_sdcard.sh --help`.
|
||||
|
||||
### How can I build an SD card from my forked GitHub Repo?
|
||||
|
||||
If you fork the RaspiBlitz repo (much welcome) and you want to run that code on your RaspiBlitz, there are two ways to do that:
|
||||
|
||||
* The quick way: For small changes in a single script, go to `/home/admin` on your running RaspiBlitz, delete the old git with `sudo rm -r raspiblitz` then replace it with your code `git clone [YOURREPO]` and `patch`
|
||||
|
||||
* The long way: If you like to install/remove/change services and system configurations you need to build a SD card from your own code. Prepare like in [Build the SD Card Image](README.md#build-the-sd-card-image) from the README but in the end run the command:
|
||||
|
||||
`wget --no-cache https://raw.githubusercontent.com/[GITHUB-USERNAME]/raspiblitz/[BRANCH]/build_sdcard.sh && sudo bash build_sdcard.sh -b [BRANCH]`
|
||||
|
||||
If you are then working in your forked repo and want to update the scripts on your RaspiBlitz with your latest repo changes, run `patch` - That's OK as long as you don't make changes to the SD card build script - for that you would need to build a fresh SD card again from your repo.
|
||||
|
||||
### How can I checkout a new branch from the RaspiBlitz repo to my forked repo?
|
||||
|
||||
You need to have your forked repo checked-out on your laptop. There your should see your forked repo as `origin` when you run `git remote -v`. If you don't see an additional `upstream` remote yet, then create it with the following command: `git remote add upstream https://github.com/rootzoll/raspiblitz.git`.
|
||||
|
||||
So, first checkout the new branch named `BRANCH` from the original RaspBlitz repo to your local computer with: `git fetch upstream` and then `git checkout -b BRANCH upstream/BRANCH`.
|
||||
|
||||
Now push the new branch to your forked GitHub repo with `git push -u origin BRANCH`.
|
||||
|
||||
Once the branch is available and synced between the RaspiBlitz GitHub repo, your forked GitHub repo and your local computer git repo, you can start developing.
|
||||
|
||||
### How can I sync a branch of my forked GitHub with my local RaspiBlitz?
|
||||
|
||||
Since v1.5 of RaspiBlitz there has been an easy way thru the SSH menus: Under `MAIN MENU > UPDATE > PATCH` you have the option to change the GitHub repository and and branch to sync with. You change the GitHub Reposity by setting the GitHub username where you forked the Repo.
|
||||
|
||||
So for example: If you forked the RaspiBlitz project (rootzoll/raspiblitz) on GitHub and your GitHub project page is now called: https://github.com/raumi75/raspiblitz ... then just change the repo to sync/patch with to your username `raumi75`.
|
||||
|
||||
Now you can use the `Patch/Sync RaspiBlitz with GitHub Repo` to easily keep your RaspiBlitz in sync with your forked repository and develop your own customizations and features.
|
||||
|
||||
Background info and doing it manually:
|
||||
|
||||
There is a git copy of the original RaspiBlitz GitHub repo on your physical RaspiBlitz in the folder `/home/admin/raspiblitz`. If you change into that folder and run `git remote -v` you can see the set origin repo.
|
||||
|
||||
You need to change that origin repo to your forked repo. You do that with:
|
||||
```
|
||||
git remote set-url origin [THE-URL-OF-YOUR-FORKED-REPO]
|
||||
```
|
||||
|
||||
Now to sync your branch namend BRANCH on your forked repo with your RaspiBlitz, you always just run:
|
||||
```
|
||||
/home/admin/config.scripts/blitz.github.sh BRANCH
|
||||
```
|
||||
|
||||
So your workflow can go like this: You write code on your local computer. Commit to your local repo, push it to your forked repo and use the sync-script above to get the code to your RaspiBlitz.
|
||||
|
||||
### How to add an app to the RaspiBlitz?
|
||||
|
||||
To add your app you can fork the raspiblitz repo, follow the `/home.admin/config.scripts/bonus.template.sh` script [see code](https://github.com/rootzoll/raspiblitz/blob/dev/home.admin/config.scripts/bonus.template.sh), copy/adapt it, test it on your RaspiBlitz and make a PR back to the main repo.
|
||||
|
||||
### How contribute a feature/change from my forked branch back to the RaspiBlitz repo?
|
||||
|
||||
In the same way as described above, you can build a new feature or test a change. Once you have something ready that you want to contribute back, you make sure it's pushed to your forked GitHub repo, and then start a pull request from your forked repo to the RaspiBlitz repo.
|
||||
|
||||
See more info: https://yangsu.github.io/pull-request-tutorial/
|
||||
|
||||
### How can I help testing a Pull Request?
|
||||
|
||||
Make sure to have the correct base image.
|
||||
Then go to the command line and create a branch for the PR:
|
||||
|
||||
```
|
||||
cd /home/admin/raspiblitz
|
||||
git fetch origin pull/[PRNUMBER]/head:pr[PRNUMBER]
|
||||
git checkout pr[PRNUMBER]
|
||||
cd /home/admin
|
||||
/home/admin/config.scripts/blitz.github.sh -justinstall
|
||||
```
|
||||
|
||||
Now you have the code of the PR active - depending on what scripts are changed you might need to reboot.
|
||||
|
||||
To change back to the code:
|
||||
```
|
||||
/home/admin/config.scripts/blitz.github.sh master
|
||||
```
|
789
FAQ.md
@ -1,789 +0,0 @@
|
||||
<!-- omit in toc -->
|
||||
# FAQ - Frequently Asked Questions
|
||||
|
||||
---
|
||||
Table of Contents
|
||||
---
|
||||
- [Upgrade](#upgrade)
|
||||
- [How to verify the SD card image after download?](#how-to-verify-the-sd-card-image-after-download)
|
||||
- [What changed on every upgrade?](#what-changed-on-every-upgrade)
|
||||
- [How do I upgrade my RaspiBlitz?](#how-do-i-upgrade-my-raspiblitz)
|
||||
- [Why do I need to re-burn my SD card for an update?](#why-do-i-need-to-re-burn-my-sd-card-for-an-update)
|
||||
- [How can I update LND or bitcoind even before the next RaspiBlitz update?](#how-can-i-update-lnd-or-bitcoind-even-before-the-next-raspiblitz-update)
|
||||
- [SSH](#ssh)
|
||||
- [What to do when on SSH I see "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!"](#what-to-do-when-on-ssh-i-see-warning-remote-host-identification-has-changed)
|
||||
- [How do I unplug/shutdown safely without SSH](#how-do-i-unplugshutdown-safely-without-ssh)
|
||||
- [I cannot connect via SSH to my RaspiBlitz. What do I do?](#i-cannot-connect-via-ssh-to-my-raspiblitz-what-do-i-do)
|
||||
- [How to SSH over Tor?](#how-to-ssh-over-tor)
|
||||
- [How to setup port-forwarding with a SSH tunnel?](#how-to-setup-port-forwarding-with-a-ssh-tunnel)
|
||||
- [How do I setup just a port-forwarding user on my public server?](#how-do-i-setup-just-a-port-forwarding-user-on-my-public-server)
|
||||
- [Display](#display)
|
||||
- [Can I flip the screen?](#can-i-flip-the-screen)
|
||||
- [How to fix my upside down LCD after update?](#how-to-fix-my-upside-down-lcd-after-update)
|
||||
- [Can I run the RaspiBlitz without a display/LCD?](#can-i-run-the-raspiblitz-without-a-displaylcd)
|
||||
- [How do I find the IP address when running without a display?](#how-do-i-find-the-ip-address-when-running-without-a-display)
|
||||
- [Debug](#debug)
|
||||
- [I have the full blockchain on another storage. How do I copy it to the RaspiBlitz?](#i-have-the-full-blockchain-on-another-storage-how-do-i-copy-it-to-the-raspiblitz)
|
||||
- [How do I generate a Debug Report?](#how-do-i-generate-a-debug-report)
|
||||
- [Why is my "final sync" taking so long?](#why-is-my-final-sync-taking-so-long)
|
||||
- [How do I backup my Lightning Node?](#how-do-i-backup-my-lightning-node)
|
||||
- [1) Securing your On-Chain- and Channel-Funds during Operation](#and-channel-funds-during-operation)
|
||||
- [2) Making a complete LND data backup](#2-making-a-complete-lnd-data-backup)
|
||||
- [How can I recover my coins from a failing RaspiBlitz?](#how-can-i-recover-my-coins-from-a-failing-raspiblitz)
|
||||
- [1) Recover LND data](#1-recover-lnd-data)
|
||||
- [2) Recover from Wallet Seed](#2-recover-from-wallet-seed)
|
||||
- [How do I move funds & channels from RaspiBlitz to LND Lightning Desktop App?](#how-do-i-move-funds--channels-from-raspiblitz-to-lnd-lightning-desktop-app)
|
||||
- [How do I change the Name/Alias of my lightning node](#how-do-i-change-the-namealias-of-my-lightning-node)
|
||||
- [How do I change the public port LND/Lightning node is running on?](#how-do-i-change-the-public-port-lndlightning-node-is-running-on)
|
||||
- [How do I solve a "signature mismatch after caveat verification" error?](#how-do-i-solve-a-signature-mismatch-after-caveat-verification-error)
|
||||
- [Why is my node not routing?](#why-is-my-node-not-routing)
|
||||
- [When using Auto-Unlock, how much security do I lose?](#when-using-auto-unlock-how-much-security-do-i-lose)
|
||||
- [I connected my HDD but it still says 'Connect HDD' on the display?](#i-connected-my-hdd-but-it-still-says-connect-hdd-on-the-display)
|
||||
- [How do I shrink the QR code for connecting my Shango/Zap/Zeus mobile phone?](#how-do-i-shrink-the-qr-code-for-connecting-my-shangozapzeus-mobile-phone)
|
||||
- [Why is my bitcoin IP on the display red?](#why-is-my-bitcoin-ip-on-the-display-red)
|
||||
- [Why is my node address on the display red?](#why-is-my-node-address-on-the-display-red)
|
||||
- [Why is my node address on the display yellow (not green)?](#why-is-my-node-address-on-the-display-yellow-not-green)
|
||||
- [How do I fix a displayed Error in my Config?](#how-do-i-fix-a-displayed-error-in-my-config)
|
||||
- [Can I run the RaspiBlitz as Backend for BTCPayServer?](#can-i-run-the-raspiblitz-as-backend-for-btcpayserver)
|
||||
- [I don't have a LAN port on my Laptop - how do I connect to my RaspiBlitz?](#how-do-i-connect-to-my-raspiblitz)
|
||||
- [Is it possible to connect the Blitz over Wifi instead of using a LAN cable?](#is-it-possible-to-connect-the-blitz-over-wifi-instead-of-using-a-lan-cable)
|
||||
- [Can I directly connect the RaspiBlitz to my laptop?](#can-i-directly-connect-the-raspiblitz-to-my-laptop)
|
||||
- [How to attach the RaspberryPi to the HDD?](#how-to-attach-the-raspberrypi-to-the-hdd)
|
||||
- [What other case options do I have?](#what-other-case-options-do-i-have)
|
||||
- [Are those "Under-Voltage detected" warnings a problem?](#are-those-under-voltage-detected-warnings-a-problem)
|
||||
- [How do I return to the menu after exiting to the command line](#how-do-i-return-to-the-menu-after-exiting-to-the-command-line)
|
||||
- [How do I setup fresh/clean/reset and without going into recovery mode?](#how-do-i-setup-freshcleanreset-and-without-going-into-recovery-mode)
|
||||
- [My blockchain data is corrupted - what can I do?](#what-can-i-do)
|
||||
- [I have two RaspiBlitz in my network - can they both be public?](#can-they-both-be-public)
|
||||
- [How can I enforce UASP mode for my SSD controller?](#how-can-i-enforce-uasp-mode-for-my-ssd-controller)
|
||||
- [I am facing maintenance/emergency mode on boot. How do I fix it?](#i-am-facing-maintenanceemergency-mode-on-boot-how-do-i-fix-it)
|
||||
- [Extras](#extras)
|
||||
- [How do I connect a UPS to the RaspiBlitz?](#how-do-i-connect-a-ups-to-the-raspiblitz)
|
||||
- [Can I run my RaspiBlitz on Solar Energy?](#can-i-run-my-raspiblitz-on-solar-energy)
|
||||
- [How to use the Let's Encrypt client](#how-to-use-the-lets-encrypt-client)
|
||||
- [Let's Encrypt - HTTP-01](#http-01)
|
||||
- [Let's Encrypt - DNS-01](#dns-01)
|
||||
- [Let's Encrypt - eMail Address](#email-address)
|
||||
- [Let's Encrypt - Installation details](#installation-details)
|
||||
- [What is this mnemonic seed word list?](#what-is-this-mnemonic-seed-word-list)
|
||||
- [How do I set up VNC?](#how-do-i-set-up-vnc)
|
||||
- [Why use BTRFS on RaspiBlitz?](#why-use-btrfs-on-raspiblitz)
|
||||
- [Storing your important Data in RAID1 with a USB Thumb Drive](#storing-your-important-data-in-raid1-with-a-usb-thumb-drive)
|
||||
- [Snapshotting the Blockchain](#snapshotting-the-blockchain)
|
||||
- [How do I use BTRFS on RaspiBlitz?](#how-do-i-use-btrfs-on-raspiblitz)
|
||||
- [How to recover a BTRFS partition?](#how-to-recover-a-btrfs-partition)
|
||||
---
|
||||
|
||||
## Upgrade
|
||||
|
||||
### How to verify the SD card image after download?
|
||||
|
||||
There are two methods, verify the hash (proves integrity) or the signature (proves integrity and authenticity)
|
||||
|
||||
You can do a quick check to verify that the sha256 hash of the file you downloaded is the same as the sha256 hash mentioned below the download link, or use the torrent download which will also check the file for a checksum after download.
|
||||
|
||||
To verify the shasum:
|
||||
|
||||
```
|
||||
shasum -a 256 [DOWNLOADED-FILE-TO-CHECK]
|
||||
```
|
||||
|
||||
But verifying the shasum does not prove to you that the SD card image was actually built by the lead developer of the RaspiBlitz project.
|
||||
|
||||
To verify that the download was actually signed by [rootzoll](https://keybase.io/rootzoll) you need to use GPG and import the following public key:
|
||||
|
||||
```
|
||||
curl --tlsv1.2 --proto '=https' https://keybase.io/rootzoll/pgp_keys.asc | gpg --import
|
||||
```
|
||||
|
||||
Next, download the "signature file" for the SD card image. It's the same download link as for the image file - just added a `.sig` at the end. You should also always find the download link for the signature file in the README right next to the image download link.
|
||||
|
||||
If you now have all the three elements needed - the imported public key, the image signature and the image file itself - you can verify the download with:
|
||||
|
||||
```
|
||||
gpg --verify [SIGNATURE-FILE] [IMAGE-FILE]
|
||||
```
|
||||
|
||||
As a result you should see a "good signature" message with a main fingerprint the same as you can find on the [keybase.io/rootzoll](https://keybase.io/rootzoll) that is ending on `1C73 060C 7C17 6461`. You should also see the sub-key fingerprint ending on `AA9D D1B5 CC56 47DA`, that is used at the moment to sign the sd card image. If those fingerprints shown correctly, the SD card image you downloaded is an original RaspiBlitz release.
|
||||
|
||||
*You can ignore any warning about the key being 'not a trusted signature' or untrusted .. as long you see "good signature" and the correct main & sub fingerprints the download is valid.*
|
||||
|
||||
### What changed on every upgrade?
|
||||
|
||||
See the [CHANGES.md](CHANGES.md) file for details.
|
||||
|
||||
### How do I upgrade my RaspiBlitz?
|
||||
|
||||
The upgrade should be quite simple - you don't need to close any channels:
|
||||
|
||||
- It would be best to get a second 16GB or 32GB SD card - but you can also reuse your old one
|
||||
- In the SSH main menu of you RaspiBlitz choose `UPDATE` & follow the dialogs until shutdown
|
||||
- Download the new RaspiBlitz image file from the [GitHub README](https://github.com/rootzoll/raspiblitz/blob/dev/README.md#installing-the-software)
|
||||
- Write the new image to the (new) SD card with a tool like [balena etcher](https://www.balena.io/etcher/)
|
||||
- RaspiBlitz with new SD card image - it now goes through a recover/update phase - this may take some time.
|
||||
- Once that's done, login once via SSH and use the password raspiblitz and set a new password A (can be your old one or a new one).
|
||||
|
||||
After the final reboot your RaspiBlitz should be ready, running the new RaspiBlitz version.
|
||||
|
||||
### Why do I need to re-burn my SD card for an update?
|
||||
|
||||
I know it would be nicer to run just an update script and be ready to go. But then the scripts would need to be written in a much more complex way to be able to work with any versions of LND and Bitcoind (they are already complex enough with all the edge cases) and testing would become even more time consuming than it is now. That's not something that a single developer can deliver.
|
||||
|
||||
For some, it might be a pain point to make an update by re-burning a new SD card - especially if you added your own scripts or made changes to the system - but that's by design. It's a way to enforce a "clean state" with every update - the same state that I tested and developed the scripts with. The reason for that pain: I simply cannot write and support scripts that run on every modified system forever - that's simply too much work.
|
||||
|
||||
With the SD card update mechanism I reduce complexity, I deliver a "clean state" OS, LND/Bitcoind and the scripts tightly bundled together exactly in the dependency/combination like I tested them and it's much easier to reproduce bug reports and give support that way.
|
||||
|
||||
Of course, people should modify the system, add own scripts, etc ... but if you want to also have the benefit of the updates of the RaspiBlitz, you have two ways to do it:
|
||||
|
||||
1. Contribute your changes back to the main project as pull requests so that they become part of the next update - the next SD card release.
|
||||
|
||||
2. Make your changes so that they survive an SD card update easily - put all your scripts and extra data onto the HDD, AND document for yourself how to activate them again after an update. The file `/mnt/hdd/app-data/custom-installs.sh` runs with sudo rights after an update/recovery from a fresh SD card. This is the place to put all the install commands, cronjobs or editing of system configs for your personal modifications of RaspiBlitz.
|
||||
|
||||
*BTW there is a beneficial side effect when updating with a new SD card: You also get rid of any malware or system bloat that happened in the past. You start with a fresh system :)*
|
||||
|
||||
### How can I update LND or bitcoind even before the next RaspiBlitz update?
|
||||
|
||||
Try updating before a official RaspiBlitz at your own risk - you can find some info about that here:
|
||||
https://raspibolt.org/bonus/raspberry-pi/odroid-setup.html#bitcoin-core-upgrade
|
||||
|
||||
|
||||
|
||||
## SSH
|
||||
|
||||
### What to do when on SSH I see "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!"
|
||||
|
||||
This means that he public SSH key of the RaspiBlitz has changed to the one you logged in with the last time under that IP.
|
||||
|
||||
It's OK when happening during an update - when you changed the SD card image. If it's really happening out of the blue - check your local network setup for a problem. Maybe the local IP of your RaspiBlitz changed? Is there a second RaspiBlitz connected? It's a security warning, so at least take some time to check if anything is strange. But also don't immediately panic - when it's in your local network, normally it's some network thing - not an intruder.
|
||||
|
||||
To fix this and to be able to login with SSH again, you have to remove the old public key for that IP from your local client computer. Just run the following command (with the replaced IP of your RaspiBlitz): `ssh-keygen -R IP-OF-YOUR-RASPIBLITZ` or remove the line for this IP manually from the known_hosts file (see the path to the file in the warning message).
|
||||
|
||||
After that, you should be able to login with SSH again.
|
||||
|
||||
### How do I unplug/shutdown safely without SSH
|
||||
|
||||
Just removing power from the RaspiBlitz can lead to data corruption if the HDD is right in the middle of a writing process. The safest way is always to SSH into the RaspiBlitz and use the "POWER OFF" option in the main menu.
|
||||
|
||||
But if cannot login with SSH and you need to power off at least remove the LAN cable (network connection)first for sometime (around 10-30 secs - until you can see no more blinking lights on the HDD) and then remove the power cable. This should minimize the risk if data corruption in this situations.
|
||||
|
||||
### I cannot connect via SSH to my RaspiBlitz. What do I do?
|
||||
|
||||
- Check the command again with how it shows on the display - do you have it typed in correctly?
|
||||
- Replace `ssh` with `sudo ssh` and try it (laptop admin password might be required).
|
||||
|
||||
If that doesn't work, try to ping the IP of the RaspiBlitz with `ping [IP-of-RaspiBlitz]`. If you get no response on the ping requests and the device is not reachable, try this check list:
|
||||
|
||||
- Make sure that your RaspiBlitz and your laptop are really on the same local network
|
||||
- Check if you have a VPN running on your laptop - some VPNs block local network
|
||||
- Some Routers have `IP Isolation` switched on - not allowing two devices to connect
|
||||
|
||||
If you've checked those and SSH is still not working: Join the conversation on [GitHub Issue #420](https://github.com/rootzoll/raspiblitz/issues/420).
|
||||
|
||||
### How to SSH over Tor?
|
||||
|
||||
SSH is already encrypted, why would I want to use it with Tor?
|
||||
* Remote access when away from LAN.
|
||||
* Anonymized access - Someone sniffing the traffic don't know where the server you are establishing a connection is, not the server side knows where the client is.
|
||||
|
||||
Create Hidden Service:
|
||||
`bash /home/admin/config.scripts/tor.onion-service.sh ssh 22 22`
|
||||
|
||||
SSH over Tor:
|
||||
`torsocks ssh admin@HiddenServiceAddress.onion`
|
||||
|
||||
Get the address:
|
||||
`sudo cat /mnt/hdd/tor/ssh/hostname`
|
||||
|
||||
### How to setup port-forwarding with a SSH tunnel?
|
||||
|
||||
To use a public server for port-forwarding thru a SSH tunnel you can use the following experimental script on the RaspiBlitz (since v1.2):
|
||||
|
||||
`/home/admin/config.scripts/internet.sshtunnel.py`
|
||||
|
||||
But first you need to make sure that the public server you are using is supporting SSH reverse-tunneling and authentication by public authorized key. Check the `/etc/ssh/sshd_config` on the public server. It should contain the following settings:
|
||||
|
||||
```
|
||||
RSAAuthentication yes
|
||||
PubkeyAuthentication yes
|
||||
GatewayPorts yes
|
||||
AllowTcpForwarding yes
|
||||
ClientAliveInterval 60
|
||||
ClientAliveCountMax 2
|
||||
```
|
||||
|
||||
*Last two parameters were added as used in the ssh tunnel demo at #GPN19 https://media.ccc.de/v/gpn19-76-einen-server-daheim-ohne-ffentliche-ipv4-adresse#t=911*
|
||||
|
||||
You can add those at the end of the file, save and reboot.
|
||||
|
||||
On the RaspiBlitz you can then setup for example to forward the gRPC port 10009 (internal port) to the port 20009 on the public server (external port) with the user = `test` and server address = `raspiblitz.com` with the following command:
|
||||
|
||||
`/home/admin/config.scripts/internet.sshtunnel.py on test@raspiblitz.com "10009<20009"`
|
||||
|
||||
You can even set multiple port forwardings like with:
|
||||
|
||||
`/home/admin/config.scripts/internet.sshtunnel.py on test@raspiblitz.com "10009<20009" "8080<9090"`
|
||||
|
||||
Please be aware that after you set such a port forwarding you will need to set the domain of the public server as a `DynamicDNS` name (leave update url empty) and then connect mobile wallets fresh, or export the macaroons/certs again. When connecting the mobile wallets you may need to adjust ports manually after QR code scan. And if you SSH tunnel the LND node port `9735` you may also need to set the custom LND port script and maybe also a manual set of the domain in the LND service would be needed. This all is very experimental at the moment ... better integration will come in the future.
|
||||
|
||||
To switch this SSH tunneling off again use:
|
||||
|
||||
`/home/admin/config.scripts/internet.sshtunnel.py off` and also deactivate the DynamicDNS again.
|
||||
|
||||
To check if a tunnel is running on the tunneling server check: `netstat -tulpn`
|
||||
|
||||
### How do I setup just a port-forwarding user on my public server?
|
||||
|
||||
Make sure the `/etc/ssh/sshd_config` has the following lines at the end:
|
||||
|
||||
```
|
||||
RSAAuthentication yes
|
||||
PubkeyAuthentication yes
|
||||
GatewayPorts yes
|
||||
AllowTcpForwarding yes
|
||||
AuthorizedKeysFile /etc/ssh/authorized_keys/%u
|
||||
```
|
||||
|
||||
The last one stores all authorized_keys in one directory with a file per user. See https://serverfault.com/questions/313465/is-a-central-location-for-authorized-keys-a-good-idea#424659 To prepare this run:
|
||||
```
|
||||
mkdir /etc/ssh/authorized_keys
|
||||
groupadd forwardings
|
||||
```
|
||||
|
||||
To add a forwarding user run:
|
||||
```
|
||||
useradd -g forwardings -d /home [USERNAME]
|
||||
echo 'command="date" [CONTENT-OF-RASPIBLITZ-ROOT-SSH-PUBKEY]' > /etc/ssh/authorized_keys/[USERNAME]
|
||||
```
|
||||
|
||||
As a result you should see a "good signature" message with a main fingerprint the same as you can find on the [keybase.io/rootzoll](https://keybase.io/rootzoll) that is ending on `1C73 060C 7C17 6461` the sub fingerprint should end on `A2D7 AA9D D1B5 CC56 47DA`. If that fingerprint is correct, the SD card image you downloaded is a original release RaspiBlitz.
|
||||
|
||||
- shutdown the RaspiBlitz - if you dont have touchscreen activated, disconnect LAN cable, wait until HDD/SSD activity slows down (no constant blinking) and then cut the power
|
||||
- take out the SD card and connect it to your laptop - it should appear as a `boot` drive
|
||||
- in the root directory of that `boot` drive create a file called `ssh.reset`
|
||||
- that file can be empty or just copy another file on that drive and rename it ()
|
||||
- eject the drive from your laptop safely
|
||||
- put SD card back into the RaspiBlitz (also make sure LAN cable is connected again)
|
||||
- power up - the RaspiBlitz should boot up & reboot again
|
||||
- then try again to SSH login
|
||||
|
||||
If you see a "REMOTE HOST IDENTIFICATION HAS CHANGED!" warning on login, that's what we wanted - the SSH cert of your RaspiBlitz changed - thats good. We just need to remove the old one from our laptop first - on OSX you can use `rm ~/.ssh/known_hosts` (deletes all cached server certs) or remove the line with your RaspiBlitz IP manually from the `~/.ssh/known_hosts` file with a text editor.
|
||||
|
||||
## Display
|
||||
|
||||
### Can I flip the screen?
|
||||
|
||||
There is now an option under `SETTINGS` to rotate the screen.
|
||||
|
||||
To do it manually: For the default 3.5" LCD you need to edit the /boot/config.txt. Run `sudo nano /boot/config.txt`
|
||||
Look for the line `dtoverlay=tft35a:rotate=270` towards the end. To flip the screen with 180 degrees change the line to `dtoverlay=tft35a:rotate=90` and reboot with `sudo reboot`. Reference: https://github.com/goodtft/LCD-show/issues/34
|
||||
|
||||
### How to fix my upside down LCD after update?
|
||||
|
||||
Some displays have a different orientation. To fix this activate/deactivate the LCD-ROTATION option in the MAINMENU > SERVICES and let it reboot. You might need to do this up to 3 times until your display works correctly.
|
||||
|
||||
### Can I run the RaspiBlitz without a display/LCD?
|
||||
|
||||
The display is one of the nice features of the RaspiBlitz but it can run without it. Maybe not all the add-on features can be used to the full extent, but you can get started without the LCD and if you wish, plug it on later.
|
||||
|
||||
If you want to use the HDMI output you can place a file called `hdmi` on the `boot` section of the RaspiBlitz sd card ... just connect the sd card to your laptop, create that file and then boot it up in the RaspberryPi.
|
||||
|
||||
If you are already logged in you can use on the console the commands:
|
||||
|
||||
- `hdmi` --> switch to HDMI
|
||||
- `lcd` --> switch to LCD
|
||||
|
||||
### How do I find the IP address when running without a display?
|
||||
|
||||
If you can login into your local internet router it should show you the IP address assigned to the RaspberryPi.
|
||||
|
||||
Another way is to use [Angry IP Scanner](https://angryip.org/) to find the IP address.
|
||||
|
||||
You can also put an empty file just called `hdmi` (without any ending) onto the sd card when connected to your laptop and then start it up on the RaspberryPi. This will activate the HDMI port and if you connect a HDMI monitor to the RaspberryPi it will show you the RaspiBlitz status screen containing the local IP address.
|
||||
|
||||
## Debug
|
||||
|
||||
### I have the full blockchain on another storage. How do I copy it to the RaspiBlitz?
|
||||
|
||||
Copying a already synced blockchain from another storage (e.g. your Laptop or external hard drive) can be a quick way to get the RaspiBlitz started or replacing a corrupted blockchain with a fresh one. Also that way you have synced and verified the blockchain yourself, and are not trusting the RaspiBlitz Torrent downloads (Don't trust, verify).
|
||||
|
||||
One requirement is that the blockchain is from another bitcoin-core client with version greater or equal to 0.17.1.
|
||||
|
||||
But we don't copy the data via USB to the device, because the HDD needs to be formatted in EXT4 and that is usually not read/writable by Windows or Mac computers. So I will explain a way to copy the data through your local network. This should work from Windows, Mac, Linux and even from another already synced RaspiBlitz.
|
||||
|
||||
Both computers (your RaspberryPi and the other computer with the full blockchain) need to be connected to the same local network. Make sure that bitcoind/bitcoin-qt is stopped on the computer containing the blockchain.
|
||||
If your blockchain source is another RaspiBlitz v1.5 or higher - go to `REPAIR` > `COPY-SOURCE`.
|
||||
If your RaspiBlitz is below v1.5 then on the terminal `sudo systemctl stop bitcoind` and then go to the directory where the blockchain data is with `cd /mnt/hdd/bitcoin` - when the copy/transfer is done later reboot a RaspiBlitz source with `sudo shutdown -r now`.
|
||||
|
||||
If everything described above is in order, start the setup of the new RaspiBlitz with a fresh SD card (like explained in the README) - it's OK that there is no blockchain data on your HDD yet - just follow the setup. When you get to the setup-point `Getting the Blockchain` choose the COPY option. Starting from version 1.0 of the RaspiBlitz this will give you further detailed instructions how to transfer the blockchain data onto your RaspiBlitz. In short: On your computer with the blockchain data source you will execute SCP commands that will copy the data over your local network to your RaspiBlitz.
|
||||
|
||||
Once you finished all the transfers, the Raspiblitz will make a quick-check on the data - but that will not guarantee that everything in detail was OK with the transfer. Check further FAQ answers if you get stuck or see a final sync with a value below 90%.
|
||||
|
||||
### How do I generate a Debug Report?
|
||||
|
||||
If your RaspiBlitz is not working correctly and you like to get help from the community, it's good to provide more debug information, so others can better diagnose your problem - please follow the following steps to generate a debug report:
|
||||
|
||||
- SSH into your raspiblitz as admin user with your password A
|
||||
- If you see the menu - use CTRL+C to get to the terminal
|
||||
- To generate debug report run: `debug`, optionally create a link with `debug -l`
|
||||
- Then copy all output beginning with `*** RASPIBLITZ LOGS ***` and share this
|
||||
|
||||
*PLEASE NOTICE: It's possible that these logs can contain private information (like IPs, node IDs, ...) - just share publicly what you feel OK with.*
|
||||
|
||||
### Why is my "final sync" taking so long?
|
||||
|
||||
First of all if you see a final sync over 90% and you can see from time to time small increase - you should be OK ... this can take a looong time to catch up with the network. Only in the case that you actively choose the `SYNC` option in the `Getting the Blockchain` is a final sync under 90% OK. If you did a torrent or a copy from another computer and you are seeing under 90% something went wrong, and the setup process is ignoring your prepared Blockchain and doing a full sync - which can almost take forever on a raspberryPi.
|
||||
|
||||
If something is wrong (like mentioned above) then try again from the beginning. You need to reset your HDD for a fresh start: SSH in as admin user. Abort the final sync info with CTRL+c to get to the terminal. Then run `sudo /home/admin/XXcleanHDD.sh -all` and follow the script to delete all data in HDD. When finished power down with `sudo shutdown now`. Then make a fresh SD card from image and this time try another option to get the blockchain. If you run into trouble the second time, please report an issue on GitHub.
|
||||
|
||||
|
||||
### How do I backup my Lightning Node?
|
||||
|
||||
There are two ways of performing a Backup:
|
||||
|
||||
#### 1) Securing your On-Chain- and Channel-Funds during Operation
|
||||
|
||||
This is best done by auto backing-up the 'channel.backup' file to a remote location. But it just secures the funds you have in your on-chain wallet or in your channels. On recovery the channels will get closed. For details on how to setup see the README:
|
||||
https://github.com/rootzoll/raspiblitz/blob/v1.2/README.md#backup-for-on-chain---channel-funds
|
||||
|
||||
#### 2) Making a complete LND data backup
|
||||
|
||||
This backups all your LND data - including all open channels. But it's just intended to use when you move your LND data between computers, during update situations, or in rescue recoveries, because replaying out-dated backups can lead to the loss of all channel funds.
|
||||
|
||||
To backup LND data in a rescue situation see next question "How can I recover my coins from a failing RaspiBlitz?".
|
||||
|
||||
### How can I recover my coins from a failing RaspiBlitz?
|
||||
|
||||
On a RaspiBlitz you have coins in your on-chain wallet (bitcoin wallet) and also coins in lightning channels. First we will try to recover all of them while trying to keep your channels open with "Recover LND data". If that is not possible you can fall back to the second option "Recover from Wallet Seed".
|
||||
|
||||
#### 1) Recover LND data
|
||||
|
||||
The best chance to recover all your LND data/channels is when you still can SSH into the RaspiBlitz and the HDD is still usable/reachable (mounted) - even if it shows some errors. If this is not possible anymore you should skip to the second option "Recover from Wallet Seed" or try to recover the LND data from the HDD (directory `lnd`) from another computer.
|
||||
|
||||
If you still can SSH in and HDD is readable, we can try to rescue/export your LND data (funds and channels) from a RaspiBlitz to then be able to restore it back to a fresh one. For this you can use the following procedure ...
|
||||
|
||||
To rescue/export your Lightning data from a RaspiBlitz (since v1.1):
|
||||
|
||||
* SSH into your RaspiBlitz and EXIT to terminal from the menu.
|
||||
* then run: `/home/admin/config.scripts/lnd.backup.sh lnd-export-gui`
|
||||
* follow the instructions of the script.
|
||||
|
||||
This will create a lnd-rescue file (ends on gz.tar) that contains all the data from the LND. The script offers you a command to transfer the lnd-rescue file to your laptop. If the transfer was successful you can now setup a fresh RaspiBlitz. Do all the setup until you have a clean new Lightning node running - just without any funding or channels.
|
||||
|
||||
Then to restore your old LND data and to recover your funds and channels:
|
||||
|
||||
* SSH into your new RaspiBlitz and EXIT to terminal from the menu.
|
||||
* then run: `/home/admin/config.scripts/lnd.backup.sh lnd-import-gui`
|
||||
* follow the instructions of the script.
|
||||
|
||||
This script will offer you a way to transfer the lnd-rescue file from your laptop to the new RaspiBlitz and will restore the old data. LND then gets restarted for you, and after some time it should show you the status screen again with your old funds and channels.
|
||||
|
||||
**Be aware that if backup is some hours old, channels could have been closed by the other party and it may take some time until you see funds back on-chain. If backup is somewhat older then 1 day also the channel counter-parties may have used your offline time to cheat you with an old state. And if your backup was not the latest state it could also be happening that you are posting an old channel state (seen as cheating) and funds of that channel get forfeited as punishment. So again .. this backup method can be risky, use with caution. While it's recommended to try in recover and rescue situations - it's not for regular backups.**
|
||||
|
||||
#### 2) Recover from Wallet Seed
|
||||
|
||||
Remember those 24 words you were writing down during the setup? That's your "cipher seed" - These words are very important for recovering your wallet. If you don't have them anymore: go back to option "Recover LND data" (see above) and check all possible ways to recover data from the HDD. If you still have the word seed: good, but read the following carefully:
|
||||
|
||||
With the word seed you can recover the on-chain funds that LND was managing for you - but it does not contain all the details about the channels you have open - it's mostly the key to your funding wallet. If you were able to close all channels or never opened any, then you should be safe: The best results to recover on-chain funds from wallet seeds have been reported from people installing the Lightning Labs App on laptop and then using the wallet seed (and same wallet passwords): https://github.com/lightninglabs/lightning-app/releases. Other people were succesful in this process using the Zap Desktop wallet (OSX, Win, Linux): https://zap.jackmallers.com/download
|
||||
|
||||
If you had open channels it would be best to check if you have also the `channel.backup` file (Static-Channel-Backup feature) that is available since LND 0.6 (RaspiBlitz v1.2) and use it in the process below ... for more details on the `channel.backup` file see [README.md on backups](README.md#backup-for-on-chain---channel-funds).
|
||||
|
||||
- SetUp a fresh RaspiBlitz (fresh SD-Card image and clean HDD).
|
||||
- During the new SetUp, when you get to the point of creating the LND wallet (see image below).
|
||||
- Choose `OLD - I had an old Node I want to recover/restore` option and then
|
||||
- Choose `SEED+SCB - Seed & channel.backup file` option
|
||||
- and follow the instructions to upload your `channel.backup` file and enter your seed
|
||||
|
||||
Then give LND some time to re-scan the blockchain. In the end you will have restored your funding wallet. You maybe need to wait for your old channel counterparts to force close the old channels until you see the coins displayed again.
|
||||
|
||||
If you don't have the `channel.backup` file but only the seed words there is a last hope - read this article:
|
||||
https://medium.com/@guggero/did-you-lose-funds-on-the-lightning-network-because-of-a-disk-crash-8971b6a92494
|
||||
|
||||
*Important: If you see a zero balance for on-chain funds after restoring from seed ... see details discussed [here](https://github.com/rootzoll/raspiblitz/issues/278) - you might try setup fresh this time with bigger look-ahead number.*
|
||||
|
||||
|
||||
### How do I move funds & channels from RaspiBlitz to LND Lightning Desktop App?
|
||||
|
||||
Before you start - download a LND-data-rescue file from your RaspiBlitz to your laptop `main menu -> UPDATE -> Update Anyway -> Start Update -> Download Backup -> FOLLOW INSTRUCTIONS and press Enter when ready with download -> START UPDATE`. Now your RaspiBlitz will power down.
|
||||
|
||||
Now install the LND Lightning Desktop App for your OS: https://github.com/lightninglabs/lightning-app/releases
|
||||
|
||||
Then start the App and create a new wallet - it's a throw-away wallet (will be deleted afterwards with no funds) - so you don't need to keep seeds safe. To get easily through the setup just make a photo of the seed with your mobile. If you get asked for funding - just click "done" until you reach the basic wallet screen. Then close the LND Desktop App.
|
||||
|
||||
Now find out the path where LND stores the wallet data on your computer.
|
||||
|
||||
Linux: [USER-DIRECTORY]/.config/lightning-app/lnd
|
||||
OSX: [USER-DIRECTORY]/Library/Application Support/lightning-app/lnd
|
||||
Windows: %USERPROFILE%\AppData\Roaming\lightning-app\lnd
|
||||
|
||||
Then open that directory on your local file manager and delete all data in the `lnd` directory.
|
||||
|
||||
Now unpack the lnd-rescue you made before and copy all the data from the `mnt/hdd/lnd` directory (including sub directories) into the LND-Path lnd directory. Delete the "lnd.conf" file.
|
||||
|
||||
Now start the Lightning App again. Your wallet password should now be your RaspIBlitz Password C.
|
||||
|
||||
**If it's working and you have access to your funds/channels on the Desktop App ... don't start the RaspiBlitz anymore. Delete SD card and HDD.**
|
||||
|
||||
### How do I change the Name/Alias of my lightning node
|
||||
|
||||
Use the "Change Name/Alias of Node" option in the Lightning - LND Wallet Options menu. The RaspiBlitz will automatically reboot after this.
|
||||
|
||||
|
||||
### How do I change the public port LND/Lightning node is running on?
|
||||
|
||||
There is a experimental script you can call from the terminal that will make all changes for you ... see details here: https://github.com/rootzoll/raspiblitz/issues/100#issuecomment-466722712
|
||||
|
||||
### How do I solve a "signature mismatch after caveat verification" error?
|
||||
|
||||
If you get this error by LND it means that something is wrong with the macaroons being used to communicate with LND .. see: https://github.com/lightningnetwork/lnd/blob/master/docs/macaroons.md
|
||||
|
||||
Fixing this depends on where you get this error:
|
||||
|
||||
* If you get it in a mobile wallet, then redo the connection with the RaspiBlitz to get fresh macaroons.
|
||||
* If you get this from RTL or from the scripts of the SSH menus of the RaspiBlitz, then go to "EXPORT Macacroons and TLS.cert" in SSH main menu and choose the the "RESET Macaroons & TLS" option.
|
||||
|
||||
Also make sure to check again on your power supply - it needs to deliver equal or more then 3A and should deliver a stable current. If you think your HDD is degrading - maybe this is a good time to replace it. See for details the FAQ question: [How can I recover my coins from a failing RaspiBlitz?](FAQ.md#how-can-i-recover-my-coins-from-a-failing-raspiblitz)
|
||||
|
||||
### Why is my node not routing?
|
||||
|
||||
1. You don't have inbound liquidity
|
||||
2. Low uptime
|
||||
3. Capital is committed to competitive destinations
|
||||
4. Capital committed to destinations no one wants to send to
|
||||
5. Fees are too high
|
||||
6. Your inbound liquidity doesn't have good inbound liquidity itself
|
||||
|
||||
### When using Auto-Unlock, how much security do I lose?
|
||||
|
||||
The idea of the "wallet lock" in general, is that your private key / seed / wallet is stored in a encrypted way on your HDD. On every restart, you have to input the password once manually (unlock your wallet), so that the LND can read and write to the encrypted wallet again. This improves your security if your RaspiBlitz gets stolen or taken away - it loses power and then your wallet is safe - the attacker cannot access your wallet.
|
||||
|
||||
When you activate the "Auto-Unlock" feature of the RaspiBlitz, the password of the wallet gets stored on the RaspiBlitz. So if an attacker steals the RaspiBlitz physically, it's now possible for them to find the password and unlock the wallet.
|
||||
|
||||
|
||||
### I connected my HDD but it still says 'Connect HDD' on the display?
|
||||
|
||||
Your HDD may have no partitions yet. SSH into the RaspiBlitz as admin (see command and password on display) and you should be offered the option to create a partition. If this is not the case:
|
||||
|
||||
Check/Exchange the USB cable. Connect the HDD to another computer and check if it shows up at all.
|
||||
|
||||
OSX: https://www.howtogeek.com/212836/how-to-use-your-macs-disk-utility-to-partition-wipe-repair-restore-and-copy-drives/
|
||||
|
||||
Windows: https://www.lifewire.com/how-to-open-disk-management-2626080
|
||||
|
||||
Linux/Ubuntu (desktop): https://askubuntu.com/questions/86724/how-do-i-open-the-disk-utility-in-unity
|
||||
|
||||
Linux/Raspbian (command line): https://www.addictivetips.com/ubuntu-linux-tips/manually-partition-a-hard-drive-command-line-linux/
|
||||
|
||||
### How do I shrink the QR code for connecting my Shango/Zap/Zeus mobile phone?
|
||||
|
||||
Make the fonts smaller until the QR code fits into your (fullscreen) terminal. In OSX use `CMD` + `-` key. In LINUX use `CTRL`+ `-` key. On WINDOWS Putty go into the settings and change the font size: https://globedrill.com/change-font-size-putty
|
||||
|
||||
### Why is my bitcoin IP on the display red?
|
||||
|
||||
The bitcoin IP is red when the RaspiBlitz detects that it cannot reach the port of bitcoin node from the outside. This means the bitcoin node can peer with other bitcoin nodes, but other bitcoin nodes cannot initiate a peering with you. Don't worry, you don't need a publicly reachable bitcoin node to run a (public) lightning node. If you want to change this however, you need to forward port 8333 on your router to the RaspiBlitz. How to do this is different on every router.
|
||||
|
||||
Some routers support a feature called UPnP where devices can automatically request a forwarding to be publicly reachable. By turning on `BTC UPnP` in the main menu `SERVICES` section, you can try if your router supports this feature.
|
||||
|
||||
On details how to set port forwarding manually on your router model see: https://portforward.com
|
||||
|
||||
### Why is my node address on the display red?
|
||||
|
||||
The node address is red when the RaspiBlitz detects that it cannot reach the port of the LND node from the outside - when the device is behind a NAT or firewall of the router. Your node is not publicly reachable. This means you can peer+openChannel with other public nodes, but other nodes cannot peer+openChannel with you. To change this you need to forward port 9735 on your router to the RaspiBlitz. How to do this is different on every router.
|
||||
|
||||
Some routers support a feature called UPnP where devices can automatically request a forwarding to be publicly reachable. By turning on `LND UPnP` in the main menu `SERVICES` section, you can try if your router supports this feature.
|
||||
|
||||
On details how to set port forwarding manually on your router model see: https://portforward.com
|
||||
|
||||
Also the self-testing of the RaspiBlitz to see if the port is forwarded or not might not work if your router is not supporting [Hairpinning](https://en.wikipedia.org/wiki/Hairpinning).
|
||||
|
||||
### Why is my node address on the display yellow (not green)?
|
||||
|
||||
Yellow is OK. The RaspiBlitz can detect that it can reach a service on the port 9735 of your public IP - this is in most cases the LND of your RaspiBlitz. But the RaspiBlitz cannot 100% for sure detect that this is its own LND service on that port - that's why it's just yellow, not green.
|
||||
|
||||
For details on how to set port forwarding on your router model see: https://portforward.com
|
||||
|
||||
### How do I fix a displayed Error in my Config?
|
||||
|
||||
When the LCD display is telling you to do a config check:
|
||||
- go to the RaspiBlitz terminal (X on main menu) and run 'patch'
|
||||
- start reboot with command: 'restart'
|
||||
- go to the RaspiBlitz terminal run the command: 'check'
|
||||
- now edit the RaspiBlitz config and get rid of the errors: 'nano /mnt/hdd/raspiblitz.conf'
|
||||
- save config with: CTRL+o
|
||||
- exit nano editor with: CTRL+x
|
||||
- start reboot with command: 'restart'
|
||||
|
||||
### Can I run the RaspiBlitz as Backend for BTCPayServer?
|
||||
|
||||
BTCPay Server is a solution to be your own payment processor to accept Lightning Payments for your online store: https://github.com/btcpayserver/btcpayserver
|
||||
|
||||
You can find setup instructions for a experimental setup here: https://goo.gl/KnTzLu
|
||||
|
||||
Thanks to @RobEdb (ask on twitter for more details) for running his demo store with RaspiBlitz: https://store.edberg.eu - buy a picture of [him and Andreas](https://store.edberg.eu/produkt/jag-andreas/) :)
|
||||
|
||||
### I don't have a LAN port on my Laptop - how do I connect to my RaspiBlitz?
|
||||
|
||||
You don't need a LAN port on your laptop as long as you can connect over WLAN to the same LAN router/switch the RaspiBlitz is connected to .. and you are on the same local network.
|
||||
|
||||
### Is it possible to connect the Blitz over Wifi instead of using a LAN cable?
|
||||
|
||||
A LAN cable is recommended because it reduces a possible source of error on the network connection side. But how to setup WLAN when you don't have a LAN-Router/Switch available see here:
|
||||
|
||||
Using [Raspberry Pi Imager: ](https://www.raspberrypi.com/software/)
|
||||
https://raspibolt.org/operating-system.html#configure-boot-options
|
||||
|
||||
Manually
|
||||
https://github.com/raspibolt/raspibolt/blob/a21788c0518618d17093e3f447f68a53e4efa6e7/raspibolt/raspibolt_20_pi.md#prepare-wifi
|
||||
|
||||
### Can I directly connect the RaspiBlitz to my laptop?
|
||||
|
||||
If you have a LAN port on your laptop - or you have a USB-LAN adapter, you can connect the RaspiBlitz directly (without a router/switch) to your laptop and share the WIFI internet connection. You can follow this [guide for OSX](https://medium.com/@tzhenghao/how-to-ssh-into-your-raspberry-pi-with-a-mac-and-ethernet-cable-636a197d055).
|
||||
|
||||
In short for OSX:
|
||||
|
||||
* make sure all VPNs are off (can interfere with local LAN)
|
||||
* connect with LAN directly
|
||||
* Settings > Sharing/Freigaben > activate "internet sharing" from WLAN to Ethernet
|
||||
* Settings > Network > Ethernet-Adapter > set to DHCP
|
||||
* in terminal > `ifconfig` there you should see the IP of the bridge100
|
||||
* in terminal > `arp -a` and check for an IP of a client to the bridge
|
||||
* in terminal > ssh admin@[clientIP]
|
||||
|
||||
If anyone has experience on doing this in Linux/Win, please share.
|
||||
|
||||
### How to attach the RaspberryPi to the HDD?
|
||||
|
||||
Try a rubber band.
|
||||
|
||||
### What other case options do I have?
|
||||
|
||||
You can put the heatsink-case (top-part mentioned in the shopping lists) into a customized 3D printed case for the RaspiBlitz called "Lightning Shell" - great work by @CryptoCloaks
|
||||
|
||||
https://www.cryptocloaks.com/product/lightningshell/ (Delivery from USA)
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
Also there is the ZKDS metal case available that also needs some extra hardware (SATA-USB expansion board and USB bridge).
|
||||
|
||||
https://diynodes.com (delivery from UK)
|
||||
|
||||

|
||||
|
||||
|
||||
### Are those "Under-Voltage detected" warnings a problem?
|
||||
|
||||
When your USB power adapter for the RaspiBlitz delivers too low of a power level, those messages with "Under-Voltage detected" (under-voltage) are shown on the display. This can lead to data loss/corruption on the HDD. If you see this just one or two times it's not OK, but can be in a tolerant window. Nevertheless it is important to make sure that your USB power adapter can deliver at least 3A (big and stable is good). If you still see those warnings maybe get a second USB Power adapter just for the HDD, and power the HDD through a Y-Cable - see https://en.wikipedia.org/wiki/Y-cable#USB or put a USB Hub with extra power between the Raspberry and the HDD.
|
||||
|
||||
|
||||
### How do I return to the menu after exiting to the command line
|
||||
|
||||
Type the command `raspiblitz` to return to the main menu if you exited to the command line.
|
||||
|
||||
### How do I setup fresh/clean/reset and without going into recovery mode?
|
||||
|
||||
When you put in a SD card with a new/clean RaspiBlitz image the RaspiBlitz will go into recovery mode because it detects the old data on your HDD and assumes you just want to continue to work with this data.
|
||||
|
||||
But there might be cases where you want to start a totally fresh/clean RaspiBlitz from the beginning. To do so you need to delete the old data from the HDD. Choose the option `RESET-ALL` under `REPAIR` to delete all data and start fresh.
|
||||
|
||||
When the HDD is clean, then flash a new RaspiBlitz sd card and your setup should start fresh.
|
||||
|
||||
### My blockchain data is corrupted - what can I do?
|
||||
|
||||
You could try to re-index, but that can take a very long time - multiple days or even weeks. But there are other options:
|
||||
|
||||
1. Get new Blockchain
|
||||
|
||||
Use `REPAIR` in the SSH main menu and then choose `RESET-CHAIN`. Then you get offered multiple options to get new blockchain data.
|
||||
|
||||
2. Backup LND Data, make fresh Blitz, Replay LND Data
|
||||
|
||||
You can backup your channel and wallet data, make a complete fresh RaspiBlitz and after that is setup, you replace the LND data with your old data. Also make sure to check again on your power supply - it needs to deliver equal or more then 3A, and should deliver a stable current. If you think your HDD or SD card is degrading - maybe this is a good time to replace it. See for details the FAQ question: [How can I recover my coins from a failing RaspiBlitz?](FAQ.md#how-can-i-recover-my-coins-from-a-failing-raspiblitz)*
|
||||
|
||||
### I have two RaspiBlitz in my network - can they both be public?
|
||||
|
||||
Yes but you need to change the port number (for example to 9736) on at least one of your RaspiBlitzes - see how to change a port below. Then you can forward both ports from your home internet router to the matching RaspiBlitzes.
|
||||
|
||||
### How can I enforce UASP mode for my SSD controller?
|
||||
|
||||
By default just tested & selected SSD encasings/controller are running enabled with UASP in RaspiBlitz. UASP brings a speed up for the SSD but also if not well supported by the SSD encasing/controller can lead to system halts. If you know for sure that your SSD encasing/controller is supporting UASP fully you can place a file called `uasp.force` on the sd card boot section after flashing the image with your laptop. See details or report errors on issue [#2488](https://github.com/rootzoll/raspiblitz/issues/2488)
|
||||
|
||||
### I am facing maintenance/emergency mode on boot. How do I fix it?
|
||||
|
||||
This behavior is caused by either the software that flashes the RaspiBlitz image onto the sd card, or by a faulty sd-card. The only solution is to try switching the software/computer you use for flashing and/or trying another sd card.
|
||||
|
||||
See issues #3039, #1053 & #782
|
||||
|
||||
## Extras
|
||||
|
||||
### How do I connect a UPS to the RaspiBlitz?
|
||||
|
||||
A UPS (Uninterruptible Power Supply) is used to protect the RaspiBlitz against power outages. Normally you put it just between your normal power outlet and your RaspiBlitz and you are set. But some UPS offer a way to communicate with devices. This can be very useful for example if on a longer power outage the battery of the UPS runs low the RaspiBlitz could detect this and power down in a clean way - instead of a sudden stop that risks data loss or corruption.
|
||||
|
||||
There is an experimental script to connect the RaspiBlitz to a UPS over USB cable build by APC - the Model tested with was [APC Back-UPS BX - BX700U-GR](https://www.amazon.de/APC-Back-UPS-Unterbrechungsfreie-Stromversorgung-BX700U-GR/dp/B00T7BYRCK) but it should work with every APC model offering a USB port.
|
||||
|
||||
To turn it on run from terminal: `/home/admin/config.scripts/blitz.ups.sh on apcusb`
|
||||
|
||||
If you have other UPS models or ways to connect ... feel free to extend this script.
|
||||
|
||||
### Can I run my RaspiBlitz on Solar Energy?
|
||||
|
||||
Yes - take a look at the project of [Chimezie Chuta](https://twitter.com/mezie16/status/1264513274080636928?s=20)
|
||||
|
||||

|
||||
|
||||
More details in his book ["A-Z of Building your own Full Bitcoin Lightning Node: A hand Book for Enthusiasts"](https://blockspace.shop/products/a-z-of-building-your-own-full-bitcoin-lightning-node-a-hand-book-for-enthusiasts)
|
||||
|
||||
### How to use the Let's Encrypt client
|
||||
|
||||
The [Let's Encrypt](https://letsencrypt.org/) client software [acme.sh](https://github.com/acmesh-official/acme.sh) is
|
||||
included (since v1.6) and can be used to create TLS certificates that are signed by the Certificate Authority (*Root
|
||||
CA*) **Let's Encrypt** and which are therefore trusted on all modern platforms.
|
||||
|
||||
In order to successfully get a signed certificate you need to **verify ownership** over a **DNS domain** or a **full
|
||||
qualified domain name** (**FQDN**). Currently Let's Encrypt **doesn't** issue certificates for IP addresses. The two
|
||||
most common standards for verification of control are `HTTP-01` and `DNS-01`.
|
||||
|
||||
The **acme.sh** client supports both modes and has a large number of DNS services (more than 50) it can interact with.
|
||||
More details can be found on the [acme.sh wiki](https://github.com/acmesh-official/acme.sh/wiki).
|
||||
|
||||
#### Let's Encrypt - HTTP-01
|
||||
|
||||
To use `HTTP-01` your RaspiBlitz needs to be accessible directly from the Internet on a **public IP address** on **port
|
||||
80**. If you don't have a public IPv4/IPv6 IP on either `eth0` or `wlan0` then it might be possible to use **NAT port
|
||||
forwarding** or an **autossh-tunnel** to fulfill this requirement.
|
||||
|
||||
If everything (this includes creating a `DNS A` or `DNS CNAME` record that points to a static or dynamic IP address) is
|
||||
set up so that the Let's Encrypt servers can reach your RaspiBlitz on port 80 then the following command will perform
|
||||
the initial creation of a signed certificate and will also store the configuration data needed to regularly refresh it.
|
||||
Just run this once and then lean back and forget about it. :-D
|
||||
|
||||
```
|
||||
~/.acme.sh/acme.sh --keylength ec-256 --issue -d hostname.example.com -w /var/www/letsencrypt/
|
||||
```
|
||||
|
||||
#### Let's Encrypt - DNS-01
|
||||
|
||||
The `DNS-01` standard **proves ownership** by creating `DNS TXT` records on the domain or subdomain you want to use.
|
||||
This requires interaction with and access to a dns server but comes with the benefit that `wildcard certificates`
|
||||
can be issued.
|
||||
|
||||
It is beyond the scope of this FAQ entry to explain all details of this - please refer to the official documentation.
|
||||
Assuming you are using the [DuckDNS](https://www.duckdns.org/) dynamic DNS service then the following command will
|
||||
get a certificate (including a wildcard subject alternative name (**SAN**) listing). It will also take care of continuous
|
||||
renewals.
|
||||
|
||||
```
|
||||
export DuckDNS_Token="abcdefgh-0123-56ij-78kl-abcd9012efgh"
|
||||
~/.acme.sh/acme.sh --issue --keylength ec-256 --dns dns_duckdns -d hostname.duckdns.org -d *.hostname.duckdns.org
|
||||
```
|
||||
|
||||
As mentioned, more that 50 other services (including self-hosted options like e.g. `nsupdate` or `PowerDNS`) are supported.
|
||||
|
||||
#### Let's Encrypt - eMail Address
|
||||
|
||||
The installation process of the `acme.sh` client includes a prompt for an eMail address. The data entered there is
|
||||
stored in the `accounts.conf` file as `ACCOUNT_EMAIL`. This address is used by Let's Encrypt to notify you about
|
||||
the expiry of certificates (which is not really needed as renewals are automated) and also about changes to their
|
||||
**Terms of Service**. For more details please check their [privacy policy](https://letsencrypt.org/privacy/).
|
||||
|
||||
It is currently considered completely fine to leave this field empty and not provide an eMail address.
|
||||
|
||||
#### Let's Encrypt - Installation details
|
||||
|
||||
The `acme.sh` script is installed in `/home/admin/.acme.sh/` - the configuration and the certificates are stored on the
|
||||
external hard disk in `/mnt/hdd/app-data/letsencrypt`.
|
||||
|
||||
### What is this mnemonic seed word list?
|
||||
|
||||
With the 24 word list given you by LND upon wallet creation you can recover your private key. You should write it down and store it at a safe place. Bear in mind that *this 24 word mnemonic seed is not based on the BIP 39* and therefore cannot be recovered using a Bitcoin wallet.
|
||||
|
||||
For more background on the LND mnemonic seed [read this article](https://github.com/lightningnetwork/lnd/blob/master/docs/recovery.md#recovering-funds-from-lnd-funds-are-safu).
|
||||
|
||||
### How do I set up VNC?
|
||||
|
||||
Enter the Console/Terminal by selecting the last option from the Raspiblitz menu.
|
||||

|
||||
|
||||
Enable the VNC server using raspi-config:
|
||||
|
||||
`sudo raspi-config`
|
||||
|
||||
In the menu, go to
|
||||
*Interfacing Options > VNC > Enable*
|
||||

|
||||
|
||||
After that reboot the Raspiblitz. You can do this easily from the Raspiblitz menu.
|
||||
In the command line, type:
|
||||
`menu`
|
||||
The Raspiblitz menu has a reboot option if you scroll down. Select it and reboot.
|
||||
|
||||

|
||||
|
||||
|
||||
After the Raspiblitz is rebooted, set a password for the VNC Server:
|
||||
`sudo vncpasswd -service`
|
||||
|
||||
Set the Authentication parameter:
|
||||
`sudo echo "Authentication=VncAuth" > /etc/vnc/config.d/common.custom`
|
||||
|
||||
Restart the VNC Server for settings to take effect:
|
||||
`sudo systemctl restart vncserver-x11-serviced`
|
||||
|
||||
Open the relevant port in the firewall (ufw):
|
||||
`sudo ufw allow vnc`
|
||||
|
||||
Start the VNC server from the Raspiblitz:
|
||||
`vncserver`
|
||||
This will run by default in the display number '1'. If you want to specify another number, run this (change *\<display-number\>* to whatever you prefer):
|
||||
`vncserver :<display-number>`
|
||||
|
||||

|
||||
|
||||
From the VNC client (e.g. your PC, laptop), connect to the IP that the previous command has displayed in the screen (I covered it in pink in the screenshot). If everything is alright, you can see the display from the VNC client now.
|
||||
|
||||
In order to stop broadcasting your display, stop the server from the Raspiblitz with this:
|
||||
`vncserver -kill :<display-number>`
|
||||
|
||||
For example:
|
||||
`vncserver -kill :1`
|
||||
|
||||
|
||||
**Note**: You may have to set the resolution through raspi-config in certain situations:
|
||||
`sudo raspi-config`
|
||||
*Advanced Options > Resolution*
|
||||
|
||||
**Hint**: From macOS, there is a built in VNC client hidden away at: /System/Library/CoreServices/Applications/Screen\ Sharing.app
|
||||
|
||||
**Hint 2**: Find more info about VNC in Raspberry [here](https://www.raspberrypi.org/documentation/remote-access/vnc/).
|
||||
|
||||
|
||||
### Why use BTRFS on RaspiBlitz?
|
||||
|
||||
The file system [BTRFS](https://de.wikipedia.org/wiki/Btrfs) for your HDD/SSD provides two new features to make the data storage more resilient:
|
||||
|
||||
#### Storing your important Data in RAID1 with a USB Thumb Drive
|
||||
|
||||
BTRFS comes with build in RAID features - that means that data can be stored on two physical drives at the same time and if one is failing the other one can be used to heal the other one or its replacement.
|
||||
|
||||
For the Raspiblitz this means that you can connect an additional 32GB USB3 Thumb Drive (under 10 USD) and have it running in a RAID with your HDD/SSD - keeping your LND channel data and all other important data of your RaspiBlitz double-safe.
|
||||
|
||||
#### Snapshotting the Blockchain
|
||||
|
||||
BTRFS comes with a build in snapshot feature - that means that your RaspiBlitz can make every day a backup of the blockchain data and if a blockchain corruption occurs (exmaple thru a power outage) there is no need to sync the complete chain again. Just switch back to the last backup state and quickly sync up from there. On BTRFS such backups can be done as snapshots that dont need much more space on the drive and are quickly done - no need to buy a bigger SSD or wait for copying over 200GB.
|
||||
|
||||
#### How do I use BTRFS on RaspiBlitz?
|
||||
|
||||
Because the BTRFS is still experimental it's a bit hidden. There are two ways to activate:
|
||||
|
||||
- When you start a fresh setup just connect a 32GB Thumb Drive on the second USB3 port from the beginning and you should be asked during HDD setup if you want to try out BTRFS and gave the Thumb Drive as RAID1.
|
||||
|
||||
- If you have a existing RaspiBlitz and you want to switch to BTRFS then you need to export a Migration File (MAINMENU > REPAIR > MIGRATION) an then format your HDD/SSD clean. When you import a Migration File during a fresh Setup (see above) you will get the option to format the HDD/SSD with BTRFS.
|
||||
|
||||
Once the Blitz is running on BTRFS you can use the '/home/admin/config.scripts/blitz.datadrive.sh' script to add a RAID drive or make a snapshot.
|
||||
|
||||
#### How to recover a BTRFS partition?
|
||||
|
||||
This articles goes thru the usual options:
|
||||
https://ownyourbits.com/2019/03/03/how-to-recover-a-btrfs-partition/
|
||||
https://seravo.fi/2015/using-raid-btrfs-recovering-broken-disks
|
127
Makefile
Normal file
@ -0,0 +1,127 @@
|
||||
SHELL = /bin/bash
|
||||
GITHUB_ACTOR = $(shell git remote -v | grep origin | head -1 | cut -d/ -f4)
|
||||
GITHUB_HEAD_REF = $(shell git rev-parse --abbrev-ref HEAD)
|
||||
|
||||
amd64-lean-desktop-uefi-image:
|
||||
# Run the build script
|
||||
cd ci/amd64 && \
|
||||
sudo bash packer.build.amd64-debian.sh \
|
||||
--pack lean \
|
||||
--github_user $(GITHUB_ACTOR) \
|
||||
--branch $(GITHUB_HEAD_REF) \
|
||||
--preseed_file preseed.cfg \
|
||||
--boot uefi \
|
||||
--desktop gnome
|
||||
|
||||
# Compute the checksum of the qemu image
|
||||
cd ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu && \
|
||||
sha256sum raspiblitz-amd64-debian-lean.qcow2 > raspiblitz-amd64-debian-lean.qcow2.sha256
|
||||
|
||||
# Compress the image
|
||||
cd ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu && \
|
||||
gzip -v9 raspiblitz-amd64-debian-lean.qcow2
|
||||
|
||||
# Compute the checksum of the compressed image
|
||||
cd ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu && \
|
||||
sha256sum raspiblitz-amd64-debian-lean.qcow2.gz > raspiblitz-amd64-debian-lean.qcow2.gz.sha256
|
||||
|
||||
# List the generated files
|
||||
ls -lah ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu/raspiblitz-amd64-debian-lean.qcow2.*
|
||||
|
||||
amd64-lean-server-legacyboot-image:
|
||||
# Run the build script
|
||||
cd ci/amd64 && \
|
||||
sudo bash packer.build.amd64-debian.sh \
|
||||
--pack lean \
|
||||
--github_user $(GITHUB_ACTOR) \
|
||||
--branch $(GITHUB_HEAD_REF) \
|
||||
--preseed_file preseed.cfg \
|
||||
--boot bios-256k.bin \
|
||||
--desktop none
|
||||
|
||||
# Compute the checksum of the qemu image
|
||||
cd ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu && \
|
||||
sha256sum raspiblitz-amd64-debian-lean.qcow2 > raspiblitz-amd64-debian-lean.qcow2.sha256
|
||||
|
||||
# Compress the image
|
||||
cd ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu && \
|
||||
gzip -v9 raspiblitz-amd64-debian-lean.qcow2
|
||||
|
||||
# Compute the checksum of the compressed image
|
||||
cd ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu && \
|
||||
sha256sum raspiblitz-amd64-debian-lean.qcow2.gz > raspiblitz-amd64-debian-lean.qcow2.gz.sha256
|
||||
|
||||
# List the generated files
|
||||
ls -lah ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu/raspiblitz-amd64-debian-lean.qcow2.*
|
||||
|
||||
amd64-fatpack-desktop-uefi-image:
|
||||
# Run the build script
|
||||
cd ci/amd64 && \
|
||||
sudo bash packer.build.amd64-debian.sh \
|
||||
--pack fatpack \
|
||||
--github_user $(GITHUB_ACTOR) \
|
||||
--branch $(GITHUB_HEAD_REF) \
|
||||
--preseed_file preseed.cfg \
|
||||
--boot uefi \
|
||||
--desktop gnome
|
||||
|
||||
# Compute the checksum of the qemu image
|
||||
cd ci/amd64/builds/raspiblitz-amd64-debian-fatpack-qemu && \
|
||||
sha256sum raspiblitz-amd64-debian-fatpack.qcow2 > raspiblitz-amd64-debian-fatpack.qcow2.sha256
|
||||
|
||||
# Compress the image
|
||||
cd ci/amd64/builds/raspiblitz-amd64-debian-fatpack-qemu && \
|
||||
gzip -v9 raspiblitz-amd64-debian-fatpack.qcow2
|
||||
|
||||
# Compute the checksum of the compressed image
|
||||
cd ci/amd64/builds/raspiblitz-amd64-debian-fatpack-qemu && \
|
||||
sha256sum raspiblitz-amd64-debian-fatpack.qcow2.gz > raspiblitz-amd64-debian-fatpack.qcow2.gz.sha256
|
||||
|
||||
# List the generated files
|
||||
ls -lah ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu/raspiblitz-amd64-debian-fatpack.qcow2.*
|
||||
|
||||
arm64-rpi-lean-image:
|
||||
# Run the build script
|
||||
cd ci/arm64-rpi && \
|
||||
sudo bash packer.build.arm64-rpi.local.sh \
|
||||
--pack lean \
|
||||
--github_user $(GITHUB_ACTOR) \
|
||||
--branch $(GITHUB_HEAD_REF)
|
||||
|
||||
# Compute the checksum of the raw image
|
||||
cd ci/arm64-rpi/packer-builder-arm && \
|
||||
sha256sum raspiblitz-arm64-rpi-lean.img > raspiblitz-arm64-rpi-lean.img.sha256
|
||||
|
||||
# Compress the image
|
||||
cd ci/arm64-rpi/packer-builder-arm && \
|
||||
gzip -v9 raspiblitz-arm64-rpi-lean.img
|
||||
|
||||
# Compute the checksum of the compressed image
|
||||
cd ci/arm64-rpi/packer-builder-arm && \
|
||||
sha256sum raspiblitz-arm64-rpi-lean.img.gz > raspiblitz-arm64-rpi-lean.img.gz.sha256
|
||||
|
||||
# List the generated files
|
||||
ls -lah ci/arm64-rpi/packer-builder-arm/raspiblitz-arm64-rpi-lean.img.*
|
||||
|
||||
arm64-rpi-fatpack-image:
|
||||
# Run the build script
|
||||
cd ci/arm64-rpi && \
|
||||
bash packer.build.arm64-rpi.local.sh \
|
||||
--pack fatpack \
|
||||
--github_user $(GITHUB_ACTOR) \
|
||||
--branch $(GITHUB_HEAD_REF)
|
||||
|
||||
# Compute the checksum of the raw image
|
||||
cd ci/arm64-rpi/packer-builder-arm && \
|
||||
sha256sum raspiblitz-arm64-rpi-fatpack.img > raspiblitz-arm64-rpi-fatpack.img.sha256
|
||||
|
||||
# Compress the image
|
||||
cd ci/arm64-rpi/packer-builder-arm && \
|
||||
gzip -v9 raspiblitz-arm64-rpi-fatpack.img
|
||||
|
||||
# Compute the checksum of the compressed image
|
||||
cd ci/arm64-rpi/packer-builder-arm && \
|
||||
sha256sum raspiblitz-arm64-rpi-fatpack.img.gz > raspiblitz-arm64-rpi-fatpack.img.gz.sha256
|
||||
|
||||
# List the generated files
|
||||
ls -lah ci/arm64-rpi/packer-builder-arm/raspiblitz-arm64-rpi-fatpack.img.*
|
88
SECURITY.md
@ -1,88 +0,0 @@
|
||||
# Security Policy
|
||||
|
||||
*NOTE: This document is just a first draft and still under construction.*
|
||||
|
||||
Only use this software with funds you could afford to lose. Especially a lightning wallet that is a hot wallet, which has constant connection to the internet and can be target of exploitation.
|
||||
|
||||
Just because the software is OpenSource does not mean its free of errors. Especially if you run additional apps, the RaspiBlitz team cannot review all the code of those external projects.
|
||||
|
||||
The software is provided "AS IS", without warranty of any kind. In no event shall the
|
||||
authors or copyright holders be liable for any claim, damages or other
|
||||
liability. [details on legal license](LICENSE.md)
|
||||
|
||||
## Supported Versions
|
||||
|
||||
Updates are made only for the latest version.
|
||||
|
||||
Security patches can be done with `MAINMENU > UPDATE > PATCH` for the current branch in the case of a high risk issue before next release.
|
||||
|
||||
The latest version always have the `latest` tag. To make sure you are using the latest version, run:
|
||||
```
|
||||
curl -s https://api.github.com/repos/rootzoll/raspiblitz/releases/latest|grep tag_name|head -1|cut -d '"' -f4
|
||||
```
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
To report security issues send an email to christian@rotzoll.de (not for support).
|
||||
|
||||
The following keys may be used to communicate sensitive information to developers:
|
||||
|
||||
| Name | Fingerprint | 64-bit |
|
||||
|------|-------------|--------|
|
||||
|Rootzoll|92A7 46AE 33A3 C186 D014 BF5C 1C73 060C 7C17 6461|1C73 060C 7C17 6461|
|
||||
|Openoms|13C6 88DB 5B9C 745D E4D2 E454 5BFB 7760 9B08 1B65|5BFB 7760 9B08 1B65|
|
||||
|
||||
You can import a key by running the following command with that individual’s fingerprint:
|
||||
```
|
||||
curl https://keybase.io/rootzoll/pgp_keys.asc | gpg --import
|
||||
curl https://keybase.io/oms/pgp_keys.asc | gpg --import
|
||||
```
|
||||
Ensure that you put quotes around fingerprints containing spaces if importing with other methods.
|
||||
|
||||
# Privacy Protection
|
||||
|
||||
When you call `debug` on the command line you get basic system & services logs that can be used if you need to report details for support by other users. There is already a basic redaction of private data (nodeids, IPv4s, .onion-adresses, balances) for that debug report BUT always check the data you post in DMs or public before sending. If you find further private data that needs redaction, please report as an issue on the github repo.
|
||||
|
||||
# Network Security
|
||||
|
||||
* Limit attack surface: Wi-fi and Bluetooth is disabled by default in the build script.
|
||||
* Firewall: UFW is active and only specific ports are open, closing ports and removing hidden services when services are uninstalled.
|
||||
* Password brute forcing protection: Fail-2-Ban is protecting the SSH login against brute-force-attacks.
|
||||
|
||||
# Software security
|
||||
|
||||
* The `admin` (and the `joinmarket` [optional]) users have passwordless sudo access to be able to perform installations and read password without much user interaction.
|
||||
|
||||
* Downloaded binaries and source code is verified with the authors' PGP keys by either:
|
||||
* signed shasum files and checking the hash of each downloaded binary
|
||||
* verfying the signature on the source code changes utilising the `git verify-commit` or `git verify-tag` commands
|
||||
|
||||
# Physical Security
|
||||
|
||||
* The lightning wallet and user interfaces are password protected by default so this has more privacy implications (in the case of physical theft) than security.
|
||||
* Basic hardening measures are applied to all non-root systemd services
|
||||
* Optional log in through SSH using a hardware wallet.
|
||||
* LUKS encryption would be welcome in the future.
|
||||
|
||||
# On-chain Funds
|
||||
|
||||
Please keep in mind that there can be two different on-chain wallets on the RaspiBlitz:
|
||||
|
||||
## Lightning Wallet (default)
|
||||
|
||||
The default is the on-chain lightning wallet - that's the wallet where you normally send your funds before opening a channel & where your funds return to when you close a channel. With the initial word seed you get during RaspiBlitz setup, you can get access again to this on-chain wallet. Keep the seed words secure in a off-line location.
|
||||
|
||||
## Bitcoin Core Wallet (deactivated by default)
|
||||
|
||||
Beside lightning you have a Bitcoin core installed. Normally, Bitcoin core acts just as a blockchain informational service to the lightning wallet and its internal separate on-chain wallet is deactivated.
|
||||
|
||||
Some apps (like Fully Noded or JoinMarket) activate the Bitcoin core wallet and use it for their own needs. This on-chain balance will not be reflected in the rest of the RaspiBlitz software and is NOT backed up by the seed words from the RaspiBlitz setup. If you make use of the Bitcoin core wallet please take care of these funds.
|
||||
|
||||
# Off-chain Funds (Lightning Channels)
|
||||
|
||||
Please note that there is no perfect backup concept for the funds in your lightning channels yet. We strongly recommend using the `Static Channel Backup` provided by LND and consider off-line location backup of that file to have the best chances to recover Lightning funds in a case of recovering from a disaster.
|
||||
|
||||
The C-ligthning lightning.sqlite3 is replicated on the SDcard from the disk in real time. See more details in the [Core Lightning FAQ](FAQ.cl.md#backups)
|
||||
|
||||
|
||||
For more practical information on this topic see: [Backup Channel Funds](README.md#backup-for-on-chain---channel-funds)
|
228
WORKSHOP.md
@ -1,228 +0,0 @@
|
||||
# RaspiBlitz Workshop Tutorial
|
||||
|
||||
One goal of the RaspiBlitz project is to provide an open DIY platform for workshops - to setup your own lightning node and learn to manage it. This tutorial is collecting best practices on how to organise a RaspiBlitz workshop.
|
||||
|
||||
<br/>
|
||||
|
||||
# Time Planning
|
||||
|
||||
First thing on planning a RaspiBlitz workshop is to calculate the time needed correctly. For example, the setup from scratch with no further support is still a weekend project - mostly because downloading and syncing the blockchain takes a lot of time.
|
||||
|
||||
|
||||
So the time required for the workshop all depends on the preparation you as a workshop organizer are interested to provide ahead of the workshop. This document outlines three starting configurations... going from most preparation required to least.
|
||||
|
||||
Note that the time estimates below are about getting a node to a "clean setup". They do not include the funding & setting up channels process - which is adding an additional 30 min to 1 hour to the calculation.
|
||||
|
||||
|
||||
Also, if your group is lager then 5 participants, calculate some extra time for individual support. You can compensate for that if you let two participants work together on one RaspiBlitz setup; this way you limit individual support and let them help each other.
|
||||
|
||||
|
||||
## Workshop Scenario A) Provide a Ready-2-Go RaspiBlitz
|
||||
|
||||
_Estimated Duration: 2 Hours_
|
||||
|
||||
Sure, one part of the fun for participants is to assemble the hardware themselves. But if you aim for the shortest workshop possible, then this is the way to go (around 2 hours length). If you have the RaspiBlitz already assembled to be operational at the workshop you should already set them up with a basic setup, maybe even transfer a small amount of coins onto them. This way you can give the workshop participants the A.B.C.D passwords on a sheet of paper and let them jump right into learning how to manage a node. While waiting for confirmations on the first channel opening you can use the time to explain how to build a RaspiBlitz from scratch and some Lightning basics.
|
||||
|
||||
These are the following steps you need to prepare (follow links for details):
|
||||
|
||||
- [Buy all the Hardware](WORKSHOP.md#buy-all-the-hardware)
|
||||
- [Assemble all the Hardware](WORKSHOP.md#assemble-all-the-hardware)
|
||||
- [Prepare HDDs with Blockchain Data](WORKSHOP.md#prepare-hdds-with-blockchain-data)
|
||||
- [Prepare SD cards with latest RaspiBlitz image](WORKSHOP.md#prepare-sd-cards-with-latest-raspiblitz-image)
|
||||
- Run Basic Node Setup
|
||||
- [Setup Workshop Environment](WORKSHOP.md#setup-workshop-environment)
|
||||
|
||||
_NOTE: Make sure that the blockchain of the RaspiBlitzes are synced before the workshop begins._
|
||||
|
||||
## Workshop Scenario B) Provide a RaspiBlitz Hardware-Kit
|
||||
|
||||
_Estimated Duration: 3 Hours_
|
||||
|
||||
|
||||
In this workshop scenario you buy all the hardware but let participants assemble the RaspiBlitz themselves - that's half the fun and people get a feel for the gear. But to keep the blockchain sync time short and be able to keep in a 3 hour timeframe you need to prepare the HDDs with blockchain data not much older than one day. Start ordering the parts at least one week before the workshop (budget as needed) and plan the day before completely for copying blockchain data to all those HDDs.
|
||||
|
||||
|
||||
These are the following steps you need to prepare (follow links for details):
|
||||
|
||||
- [Buy all the Hardware](WORKSHOP.md#buy-all-the-hardware)
|
||||
- [Prepare HDDs with Blockchain Data](WORKSHOP.md#prepare-hdds-with-blockchain-data)
|
||||
- [Prepare SD cards with latest RaspiBlitz image](WORKSHOP.md#prepare-sd-cards-with-latest-raspiblitz-image)
|
||||
- [Setup Workshop Environment](WORKSHOP.md#setup-workshop-environment)
|
||||
|
||||
Variation: If you don't have a big bugdet to prefinance the parts or people have already hardware they want to bring you can just buy the HDDs and SD cards and prepare them to run this scenario.
|
||||
|
||||
|
||||
## Workshop Scenario C) Bring your own Hardware
|
||||
|
||||
|
||||
_Estimated Duration: 4–6 Hours_
|
||||
|
||||
This scenario is advised only for small groups, or you'll need to bring multiple blockchain copy stations - see details on "Prepare HDDs with Blockchain Data". Otherwise it needs the least prepartion time and prefinance and can be announced to participants about 5 days beforehand, so that they have time to order all the parts online.
|
||||
|
||||
|
||||
- [Instruct Participants to bring Hardware](WORKSHOP.md#instruct-participants-to-bring-hardware)
|
||||
- [Prepare Blockchain Copy Station](WORKSHOP.md#prepare-blockchain-copy-station)
|
||||
- [Setup Workshop Environment](WORKSHOP.md#setup-workshop-environment)
|
||||
|
||||
|
||||
As soon as the participants arrive at the workhop, make sure to check their hardware list. We also suggest taking their HDDs and starting the blockchain copy process before official starting time.
|
||||
|
||||
|
||||
<br/>
|
||||
|
||||
|
||||
# Checklist for Running a Workshop
|
||||
|
||||
Make sure you have the following hardware and infrastructure ready for the workshop:
|
||||
|
||||
- Lots of 'multiple power outlets/extensions' (min. 2 per participants - RaspiBlitz + Laptop)
|
||||
- Network-Switch with enough ports (min. 1 per RaspiBlitz)
|
||||
- Enough LAN network cables (short ones to connect the RaspiBlitzes)
|
||||
- Good internet connection at location with LAN port (or a WLAN to LAN adapter)
|
||||
- Extra WLAN Router (if you are not sure if LAN & WLAN is not on the same network at location)
|
||||
- One or two USB SD card adapters
|
||||
- One or two USB-C to USB-A adapters
|
||||
- Some Tape, Markers & Pens always come in handy (also for participants to wirte down seeds & passwords)
|
||||
- Potentially some bitcoin funds (if people dont have their own to start funding channels)
|
||||
|
||||
Participants need to bring at least their laptops.
|
||||
|
||||
<br/>
|
||||
|
||||
# Running of the Workshop
|
||||
|
||||
_The basic structure of the workshop is set by the RaspiBlitz setup process. Simply follow that. The following parts should share some experiences and suggestions on how you can optimize the time and mentoring during this process. Feel free to share your experience here._
|
||||
|
||||
## Welcome and Intro
|
||||
|
||||
In the beginning, it's great to give a small introduction to the Lightning Network and show the RaspiBlitz GitHub page to let everybody know where to find the basic info. But try to keep it around 10 min, in order to not waste time.
|
||||
|
||||
|
||||
Also, even before the intro, take care of the blockchain preparation. If people bring clean HDDs, hook them up to your blockchain copy station as soon as possible. If you have to copy on location, plan to spend time for some deeper educational intro while the HDDs get prepared.
|
||||
|
||||
## Assembling
|
||||
|
||||
If you hand out hardware kits or people bring their own hardware, it's time to put it together. If you are in a ready-2-go scenario, of course skip this and just hand them out.
|
||||
|
||||
## Basic Setup
|
||||
|
||||
|
||||
Connect everybody's laptop to the same local network the RaspiBlitzes are connected to. Be prepared to explain how to open a terminal - Windows' users especially need some help here (see README on this).
|
||||
|
||||
|
||||
Then everybody is SSHing into the RaspiBlitz and is following the setup dialog. Hand out paper and pens for people to write down their passwords and wallet seeds.
|
||||
|
||||
## Waiting Time
|
||||
|
||||
After the lightning wallet setup comes the longest waiting time during the workshop - around 30 min. When you have a presynced ready-2-go or up to 1 hour for the other scenarios. It's the time when the node is syncing up the blockchain and LND is scanning. If you see someone's blockchain progress under 97%, something is wrong - possibly the HDD was not correctly prepared or the blockchain data is way too old to finish during workshop time if you work with old RaspberryPi3. The new RaspberryPi4 with SSD can catch up much faster.
|
||||
|
||||
|
||||
Use this time for a more in-depth educational segment on lightning in general. This time can also be used to demo with one RaspiBlitz that is already on clean-setup (you prepared before the workshop) how the funding, setting up channels and the other features of the RaspiBlitz work. That way people see what are the next steps once their node is ready and even if your workshop time is over by then they can know the next steps to do at home.
|
||||
|
||||
Also this time is good for troubleshooting in individual sessions. If someone is not able to finish the sync on location in time shutdown the Raspiblitz from SSH terminal with CTRL+C and then `shutdown now`. If the device gets connected back up at home it should pickup the sync/scan process (let people know about the wallet unlock).
|
||||
|
||||
|
||||
## Finalizing Setup
|
||||
|
||||
Once the RaspiBlitz is ready (LCD shows status screen) and people can SSH into the main menu, let them go into the `SERVICES` section and activate the `RTL WebUI`. It's the best interface to then continue with the peering, funding and channel opening.
|
||||
|
||||
## Funding, Channels, API
|
||||
|
||||
Check how much time is left to go thru the next steps of connecting to peers, funding and opening channels. While you wait on funding or channel opening confirmations, its a good moment to try to connect users mobile wallets with the device. But just so that on the local network for demo - dynamicDNS is something people then can try at home with port forwarding on their routers.
|
||||
|
||||
Its also nice to add casual social open-end segment to the end of the workshop. So people can already go into personal conversations, music and beverages while some last nodes sync up, confirmations come in and people sending their first satoshis on some lightning chess or from node to node.
|
||||
|
||||
Here are some videos that show what else is possible with the RaspiBlitz:
|
||||
|
||||
- [Lightning Network LND API - Buying Stickers using Commandline](https://youtu.be/tocJFPU8sAc) 24min
|
||||
|
||||
<br/>
|
||||
|
||||
# Organisation Tasks
|
||||
|
||||
|
||||
*Which of the following organisation tasks are relevant for you depends on which starting scenario you choose (see above). Here is the complete possible list with details:*
|
||||
|
||||
|
||||
## Buy all the Hardware
|
||||
|
||||
See the shopping list on the RaspiBlitz Github README. You need to buy all of those, and every participant also needs a short (about 1m) network cable.
|
||||
|
||||
|
||||
From experience start ordering two weeks before the workshop (if you need to assemble) and minimum one week if you're handing out hardware kits - even if you have Amazon Prime. There is always a shipment coming late, and it's a lot of packages.
|
||||
|
||||
|
||||
If you like to support the RaspiBlitz project you can order a ready-2-go RaspiBlitz or a all-you-need-hardwareset for your RaspiBlitz workshop from [raspiblitz.com](https://raspiblitz.com)
|
||||
|
||||
## Instruct Participants to Bring Hardware
|
||||
|
||||
This is for the scenario where people bring their own hardware. Make sure to let them know at least a week before the event so that there is enough time for online ordering. Also make sure that especially the power supply needs to provide 3A and a stable current (big fat with a thick cable is good) because that's the most often error source if people just reuse some old weak power supply.
|
||||
|
||||
In all scenarios make sure people bring their laptops.
|
||||
|
||||
## Assemble all the Hardware
|
||||
|
||||
|
||||
Basically you follow the assembly instructions on the RaspiBlitz GitHUb README. Think of a safe way to transport the assembled devices to the workshop location - HDDs like it soft.
|
||||
|
||||
|
||||
## Prepare HDDs with Blockchain Data
|
||||
|
||||
This is the most time consuming part of the preparation. Try it once to get a feel for how much time you need to prepare one HDD. If you prepare more than one HDD check out the "Copystation" script below.
|
||||
|
||||
A prepared HDD is formatted in EXT4 and named "BLOCKCHAIN". In a folder called `bitcoin` it contains a copy of the following data folders from a running Bitcoin core client (same version on RaspiBlitz).
|
||||
|
||||
```
|
||||
/bitcoin/blocks
|
||||
/bitcoin/chainstate
|
||||
```
|
||||
|
||||
The bitcoin core client (0.17.1 or higher) needs to be stopped while the data is copied to the HDD.
|
||||
|
||||
The easiest way to get a "template" of such HDD is to setup a fresh RaspiBlitz (without channel and fundings) and then run the script `/home/admin/XXcleanHDD.sh` and manually delete all rest data from the HDD and just leave those folders.
|
||||
|
||||
|
||||
Once you have that "template" you can make an image from that and write that image to the other HDDs.
|
||||
|
||||
|
||||
|
||||
## Prepare Blockchain Copy Station
|
||||
|
||||
In the RaspiBlitz GitHub repo and also on every RaspiBlitz (since v1.3) you can find the script:
|
||||
`/home/admin/XXcopyStation.sh`
|
||||
|
||||
This can be used to prepare and keep multiple HDDs in snyc with blockchain data in preparation of a workshop. You can start it directly on a RaspiBlitz and turn it into "Copy Station Mode" by executing on the command line:
|
||||
|
||||
`sudo /home/admin/XXcopyStation.sh`
|
||||
|
||||
_Beware that it will not run as a Lightning Node during that time (LND is stopped). And to reset it back into normal mode you need to stop the script with `CTLR+c` and the reboot with `sudo shutdown -r now`._
|
||||
|
||||
|
||||
In "Copy Station Mode" the RaspiBlitz will just run the bitcoind (so it needs network connection), copy fresh blockchain data over to a template folder on the HDD called `/mnt/hdd/templateHDD` and from there sync it to further HDDs that get connected to it.
|
||||
|
||||
If you run it in a setup like on this photo with an extra powered USB hub, you can connect up to 10 HDDs at once to be synced with an almost up-to-date blockchain.
|
||||
|
||||
At the moment the "Blockchain Copy Station" is just a computer (laptop - not a RaspberryPi) having an image of a "template" HDD (see above) and you can attach (with a USB3.0 Hub) multiple fresh HHDs to it and start writing in the template image to that.
|
||||
|
||||
To update the "template" HDD for the next workshop use it for a fresh clean RaspiBllitz setup just days before, sync the blockchain to 100% and repeat the process above.
|
||||
|
||||
_This version is not tested, but seems like the easiest to setup so far. Images can have the problem of being too large when some 1TB HDDs are just some bytes smaller. So for the template HDD it would be best to find the smallest 1TB HDD possible or just writing the image to HDDs of the same brand & model._
|
||||
|
||||
Copying the blockchain between RaspberryPis during the workshop is not an option, because the network and its USB2 is too slow and will take 3 to 4 hours.
|
||||
|
||||
For former workshops I had a laptop just with the data and had a script that was formatting and rsyning that data over to a fresh HDD. That took around 1,5 hours per HDD.
|
||||
|
||||
_If someone has a better idea for a 'Blockchain Copy Station', please feel free to contribute._
|
||||
|
||||
## Prepare SD Cards with Latest RaspiBlitz Image
|
||||
|
||||
Download the latest RaspiBlitz SD card image from the README page. `Balena Etcher` is the best image writing software for this use case because if you have multiple sd card adapters, you can write multiple cards at once,cutting down your preparation time.
|
||||
|
||||
## Setup Workshop Environment
|
||||
|
||||
See hardware checklist for what to bring to the workshop in the earlier chapter.
|
||||
|
||||
Setup power outlets for everybody. Its always good to be way early at the workshop location for setup, especially if you run the "pre-sync" of the ready-2-go scenario.
|
||||
|
||||
Most important is the network setup. Every RaspiBlitz needs a LAN port in the switch and that switch needs to be on the same local network as the WLAN so that participants laptop can SSH into the RaspiBlitz. If that is not the case or you cannot confirm that before the event its best to bring an additional WLAN router. Then you give the WLAN router internet uplink thru the available LAN cable and you put the network switch for the Raspiblitzes behind that router and open an additional WLAN on that WLAN router for everybody to connect to. It's OK to be behind a NAT; it's just important for everybody to be behind the same NAT.
|
||||
|
150
alternative.platforms/Proxmox/README.md
Normal file
@ -0,0 +1,150 @@
|
||||
# Install Raspiblitz on proxmox
|
||||
|
||||
Here I want to show you how to install a new Raspiblitz on a Debian VM on Proxmox and get it running. My Raspiblitz ran very long and stable on a Raspberry Pi 4 with 8GB RAM. It would very likely continue to do so for a longer time, however my Lightning Node is growing more and more and various apps and services are built on top of my Node. So the issue of availability and backup becomes more and more important. Therefore I decided to migrate the Raspiblitz to a VM in Proxmox. So I have much more room to maneuver regarding backup and administration.
|
||||
|
||||
This guide here will help you to set up a completely new Raspiblitz with Proxmox. The guide for the migration will follow soon...
|
||||
|
||||
### What is needed?
|
||||
|
||||
- Proxmox installation on an Intel NUC, laptop or server
|
||||
- at least 1TB SSD
|
||||
|
||||
You have several options for the SSD: Either you install the 1TB SSD in the system and install your Proxmox host on it or (as I did) you have an internal SSD (in my case 500GB M2 SSD) where the host operating system is located. I connected the 1TB SSD via SATA to my Intel NUC. This is used exclusively for storing the blockchain and Lightning Node.
|
||||
|
||||
## Create Debian VM
|
||||
|
||||
We install Raspiblitz on a fresh Debian machine. Therefore we have to download the ISO file from Debian first. Here just choose the right processor architecture: (For me it is amd64)
|
||||
|
||||
[https://www.debian.org/distrib/netinst](https://www.debian.org/distrib/netinst)
|
||||
|
||||
Afterwards this ISO file can be uploaded under Proxmox. To do this, click on the Local Storage, ISO Images and on Upload:
|
||||
|
||||

|
||||
|
||||
Now you can create a new virtual machine by clicking on "Create VM" in the upper right corner. Now we click on it.
|
||||
|
||||

|
||||
|
||||
A settings window appears where we can now specify the properties of the VM. In my example, the properties look like this:
|
||||
|
||||
VM ID and name can be selected by yourself.
|
||||
|
||||

|
||||
|
||||
Under the item "OS" we now select the previously downloaded ISO file:
|
||||
|
||||

|
||||
|
||||
Under "System" we can leave the default settings. I have checked Qemu Agent so that the VM can communicate with the Proxmox host via Qemu Agent and transfer data.
|
||||
|
||||

|
||||
|
||||
Under "Disks" you can now specify the desired size of the VM. I have set the same size (32GB) as my SD cards from the Raspiblitz are big. This can be increased at any time in the future, if you need more space and the host machine also has this space available. Another advantage why I virtualized my Raspiblitz :)
|
||||
|
||||

|
||||
|
||||
Under "CPU" you can specify the desired number of cores. Of course, this depends on your host operating system. My Intel NUC has 4 cores, so I can provide 4 cores to the VM.
|
||||
|
||||

|
||||
|
||||
Under "Memory" you must specify the desired RAM number in MB. This also depends on your host. If possible, I would enter 8GB or more. **Small hint: 1GB = 1024 MB. So 8GB = 8192 MB. (8 x 1024)**
|
||||
|
||||

|
||||
|
||||
The VM also needs a network adapter. You also have to select this adapter based on your Proxmox installation. Default will be vmbr0. On my Proxmox I have configured several VLAN, where vmbr3 is my BTC VLAN. But this is only the case for me.
|
||||
|
||||

|
||||
|
||||
After that you can click on "Finish" and the VM will be created. This now also appears with name on the left side and can now be started. (Right click -> Start)
|
||||
|
||||
Now you can open the console (top right) of the VM and do the Debian installation steps normally. I have abbreviated the steps a bit here:
|
||||
|
||||
- Install
|
||||
- Select Language
|
||||
- Select Location
|
||||
- Select Keyboard Language
|
||||
- Set Hostname
|
||||
- Set domain (or just leave it empty)
|
||||
- Set root password
|
||||
- Create new user (mine is called "pi")
|
||||
- Set password for user pi
|
||||
- Guided - use entire disk
|
||||
- Select SCSI3 harddisk
|
||||
- All files in one partition
|
||||
- Finish partitioning and write changes to disk
|
||||
- "Write the changes to disks?" -> Yes
|
||||
- Scan extra installation media? -> No
|
||||
- Package manager -> Select your country
|
||||
- Package manager -> deb.debian.org
|
||||
- http proxy -> leave empty and continue
|
||||
- Participate in the package usage survey? -> No
|
||||
- Software selection: SSH server and standard utilities should be sufficient here
|
||||
- Install the GRUB boot loader to your primary drive? -> Yes
|
||||
- Select /dev/sda
|
||||
|
||||
The VM is now installed and starts to boot. In the meantime you can remove the ISO file. (VM -> Hardware -> CD/DVD Drive -> Do not use any media -> OK)
|
||||
|
||||
## Add storage
|
||||
|
||||
Now to install Raspiblitz on this new VM we need to do 2 things: Connect the hard disk for the blockchain data and pass it to the VM and install the SD Card Builder Script of Raspiblitz. We start first with the hard disk, where there are 2 variants:
|
||||
|
||||
### Variant 1: External hard disk
|
||||
|
||||
Now connect the hard drive to the host system using SATA or USB. In my example here I use a USB hard disk, which I connected via USB 3.1 to the Intel NUC. The best thing to do now is to shutdown the Raspiblitz VM.
|
||||
|
||||
Now you need to log in to the console on the Proxmox host system and do the following:
|
||||
|
||||
https://www.youtube.com/watch?v=U-UTMuhmC1U
|
||||
|
||||
The commands from the video here again to copy:
|
||||
|
||||
```
|
||||
ls -n /dev/disk/by-id/
|
||||
/sbin/qm set [VM-ID] -virtio2 /dev/disk/by-id/[DISK-ID]
|
||||
```
|
||||
|
||||
It is important here that the hard disk is passed through by ID. If something changes in the dev sda order in the future, the correct hard disk is still connected to the VM.
|
||||
|
||||
### Variant 2: Use internal storage
|
||||
|
||||
If you have enough space on the host operating system, you do not have to use an external hard disk. You can simply add a second hard disk to the VM under "Hardware -> Add -> Hard Disk". I would recommend at least 1TB as storage size.
|
||||
|
||||
* * *
|
||||
|
||||
Regardless of whether variant 1 or 2 was executed, the VM should now have 2 hard disks connected in the hardware overview: A smaller one (e.g. 32GB) where the operating system of Raspiblitz will be installed and run and a larger one (e.g. 1TB or more) where all the blockchain data will be stored later.
|
||||
|
||||

|
||||
|
||||
## Install Raspiblitz
|
||||
|
||||
Now we are ready to install Raspiblitz via script. For this we start the Raspiblitz VM and log in as root user in the console. First of all update everything:
|
||||
|
||||
```
|
||||
apt update
|
||||
apt upgrade -y
|
||||
apt install sudo
|
||||
```
|
||||
|
||||
Now we need to download the Build SDCard Script from Rootzoll. The version can be customized as you like. The latest version (as of block time 768745) is the 1.9.
|
||||
|
||||
```
|
||||
wget https://raw.githubusercontent.com/rootzoll/raspiblitz/v1.9/build_sdcard.sh
|
||||
```
|
||||
|
||||
And run:
|
||||
|
||||
```
|
||||
sudo bash build_sdcard.sh
|
||||
```
|
||||
|
||||
The script now shows you information from your system. If all this is correct, start with "yes".
|
||||
|
||||

|
||||
|
||||
Now the installation takes a few minutes. Do not abort or shut down the VM here, just let it install. When everything is finished, a reboot is needed:
|
||||
|
||||
```
|
||||
sudo shutdown -r now
|
||||
```
|
||||
|
||||
Now you can call the IP address of your VM in the browser and perform the normal installation steps of Raspiblitz.
|
BIN
alternative.platforms/Proxmox/images/2022-09-21_16-05.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
alternative.platforms/Proxmox/images/2022-09-21_20-03.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
alternative.platforms/Proxmox/images/2022-09-21_20-04.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
alternative.platforms/Proxmox/images/2022-09-21_20-05.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
alternative.platforms/Proxmox/images/2022-09-21_20-06.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
alternative.platforms/Proxmox/images/2022-09-21_20-06_1.png
Normal file
After Width: | Height: | Size: 43 KiB |
BIN
alternative.platforms/Proxmox/images/2022-09-21_20-07.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
alternative.platforms/Proxmox/images/2022-09-21_20-08.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
alternative.platforms/Proxmox/images/2022-09-21_20-16.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
BIN
alternative.platforms/Proxmox/images/2022-09-21_21-04.png
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
alternative.platforms/Proxmox/images/2022-09-21_21-16.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
@ -4,11 +4,7 @@
|
||||
- [Recommended specs](#recommended-specs)
|
||||
- [amd64 image](#amd64-image)
|
||||
- [Requirements](#requirements)
|
||||
- [Download](#download)
|
||||
- [Verify](#verify)
|
||||
- [Write the image to the OS disk](#write-the-image-to-the-os-disk)
|
||||
- [Extend the partition](#extend-the-partition)
|
||||
- [Start the Raspiblitz setup](#start-the-raspiblitz-setup)
|
||||
- [Automated builds](#automated-builds)
|
||||
- [Virtual Machine](#virtual-machine)
|
||||
- [Create the base image](#create-the-base-image)
|
||||
- [Building the Raspiblitz scripts](#building-the-raspiblitz-scripts)
|
||||
@ -17,7 +13,7 @@
|
||||
- [Armbian](#armbian)
|
||||
- [Ubuntu](#ubuntu)
|
||||
- [Python upgrade](#python-upgrade)
|
||||
- [Create an image release for amd64](#create-an-image-release-for-amd64)
|
||||
- [Manual image release for amd64](#manual-image-release-for-amd64)
|
||||
- [Requirements:](#requirements-1)
|
||||
- [Create an NTFS formatted USB Stick / USB disk](#create-an-ntfs-formatted-usb-stick--usb-disk)
|
||||
- [Boot Ubuntu Live from USB](#boot-ubuntu-live-from-usb)
|
||||
@ -30,10 +26,9 @@
|
||||
- [Start Tails](#start-tails)
|
||||
- [Import the signing keys](#import-the-signing-keys)
|
||||
- [Prepare the disk](#prepare-the-disk)
|
||||
- [Verify the downloaded image](#verify-the-downloaded-image)
|
||||
- [Linux instructions](#linux-instructions)
|
||||
- [Create a torrent](#create-a-torrent)
|
||||
- [Switch off sleep, suspend and hibernation](#switch-off-sleep-suspend-and-hibernation)
|
||||
- [Verify the downloaded image](#verify-the-downloaded-image)
|
||||
- [Linux instructions](#linux-instructions)
|
||||
- [Create a torrent](#create-a-torrent)
|
||||
|
||||
## Minimum requirements
|
||||
* ARMv8 or x86 processor (64 bit)
|
||||
@ -51,7 +46,6 @@ Specifications of the tested hardware: [hw_comparison.md](hw_comparison.md)
|
||||
All testers are welcome. Open an issue for your specific board to collaborate and share your experience.
|
||||
|
||||
## amd64 image
|
||||
|
||||
### Requirements
|
||||
* amd64 Laptop, Desktop or Server connected to the internet via a LAN cable
|
||||
|
||||
@ -61,35 +55,8 @@ All testers are welcome. Open an issue for your specific board to collaborate an
|
||||
* if the laptop has an optical drive an [Optical Drive Bay Caddy / adapter](https://www.amazon.co.uk/dp/B07SHSCVC7/) can be used to change it to a second SSD instead.
|
||||
* `Data disk`: a new, minimum 1TB SSD is recommended - stores data independent of the operating system
|
||||
* usually placed internally
|
||||
|
||||
|
||||
### Download
|
||||
* raspiblitz-amd64-v1.7.2-2022-04-03
|
||||
* manually created with the [process described below](#Create-an-image-release-for-amd64) from the [`dev` branch](https://github.com/rootzoll/raspiblitz/tree/dev) at [43c7384](https://github.com/rootzoll/raspiblitz/tree/43c7384cb70523c57990e0c409d51cfd7b818a10)
|
||||
* Torrent [file](/home.admin/assets/raspiblitz-amd64-v1.7.2-2022-04-03.torrent) and [magnet link](/home.admin/assets/raspiblitz-amd64-v1.7.2-2022-04-03.magnet)
|
||||
* Direct downloads:
|
||||
* https://mega.nz/folder/AlsC0A4L#mTPOke2OLJIGU4iMyAqwBw
|
||||
* https://keybase.pub/oms/images/raspiblitz-amd64-v1.7.2-2022-04-03
|
||||
```
|
||||
# download from keybase using the command line
|
||||
mkdir raspiblitz-amd64-v1.7.2-2022-04-03
|
||||
cd raspiblitz-amd64-v1.7.2-2022-04-03
|
||||
wget -c https://oms.keybase.pub/images/raspiblitz-amd64-v1.7.2-2022-04-03/raspiblitz-amd64-v1.7.2-2022-04-03.img.gz
|
||||
wget -c https://oms.keybase.pub/images/raspiblitz-amd64-v1.7.2-2022-04-03/raspiblitz-amd64-v1.7.2-2022-04-03.img.gz.sha256
|
||||
wget -c https://oms.keybase.pub/images/raspiblitz-amd64-v1.7.2-2022-04-03/raspiblitz-amd64-v1.7.2-2022-04-03.img.gz.sha256.asc
|
||||
```
|
||||
|
||||
### [Verify](#Verify-the-downloaded-image)
|
||||
### Write the image to the OS disk
|
||||
* On a separate computer: write the image to the USB connected OSdisk or SDcard with [Balena Etcher](https://www.balena.io/etcher/)
|
||||
* On the same computer: boot an Ubuntu Live from USB with which the image can be downloaded, verified and flashed on an internal or USB connected OS disk
|
||||
### Extend the partition
|
||||
* start Disks or any partition manager and extend the partition to the full size of the disk on the OS disk (just flashed)
|
||||
|
||||
### Start the Raspiblitz setup
|
||||
* Assemble and start the computer.
|
||||
* Log in with admin and open a terminal on the local desktop or log in with ssh (username `admin` password: `raspiblitz`)
|
||||
* Continue the setup as described in the [main readme](https://github.com/rootzoll/raspiblitz#setup-process-detailed-documentation)
|
||||
### Automated builds
|
||||
* find the download links or build locally with the instructions in: [/ci/README.md](/ci/README.md)
|
||||
|
||||
## Virtual Machine
|
||||
|
||||
@ -111,23 +78,26 @@ Tested with:
|
||||
These not need installation, password: `osboxes.org`
|
||||
|
||||
### Building the Raspiblitz scripts
|
||||
* Run the build script in the terminal of the guest OS (with sudo access):
|
||||
* Run the build script in the terminal of the base OS (with sudo access):
|
||||
|
||||
```bash
|
||||
# download the build script
|
||||
wget https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/build_sdcard.sh
|
||||
# run
|
||||
sudo bash build_sdcard.sh -f true -b dev -d headless -t false -w off
|
||||
# Options:
|
||||
# -h, --help this help info
|
||||
# -i, --interaction [0|1] interaction before proceeding with exection (default: 1)
|
||||
# -f, --fatpack [0|1] fatpack mode (default: 1)
|
||||
# -u, --github-user [rootzoll|other] github user to be checked from the repo (default: rootzoll)
|
||||
# -b, --branch [v1.7|v1.8] branch to be built on (default: v1.7)
|
||||
# -d, --display [lcd|hdmi|headless] display class (default: lcd)
|
||||
# -t, --tweak-boot-drive [0|1] tweak boot drives (default: 1)
|
||||
# -w, --wifi-region [off|US|GB|other] wifi iso code (default: US) or 'off'
|
||||
```
|
||||
```bash
|
||||
# download the build script
|
||||
wget https://raw.githubusercontent.com/rootzoll/raspiblitz/dev/build_sdcard.sh
|
||||
# run
|
||||
sudo bash build_sdcard.sh -f false -b dev -d headless -t false -w off
|
||||
```
|
||||
```
|
||||
Options:
|
||||
-EXPORT just print build parameters & exit'
|
||||
-h, --help this help info
|
||||
-i, --interaction [0|1] interaction before proceeding with execution (default: 1)
|
||||
-f, --fatpack [0|1] fatpack mode (default: 1)
|
||||
-u, --github-user [raspiblitz|other] github user to be checked from the repo (default: raspiblitz)
|
||||
-b, --branch [v1.7|v1.8] branch to be built on (default: v1.10)
|
||||
-d, --display [lcd|hdmi|headless] display class (default: lcd)
|
||||
-t, --tweak-boot-drive [0|1] tweak boot drives (default: 1)
|
||||
-w, --wifi-region [off|US|GB|other] wifi iso code (default: US) or 'off'
|
||||
```
|
||||
|
||||
* Switch off when ready
|
||||
* Attach an other disk (can be even small if you prune or [stop bitcoind](https://github.com/rootzoll/raspiblitz/issues/1500#issuecomment-982779830) manually.
|
||||
@ -233,13 +203,13 @@ Continue with building the SDcard: https://github.com/rootzoll/raspiblitz#build-
|
||||
python3 --version
|
||||
```
|
||||
|
||||
## Create an image release for amd64
|
||||
## Manual image release for amd64
|
||||
|
||||
Work notes partially based on: https://github.com/rootzoll/raspiblitz/blob/v1.7/FAQ.md#what-is-the-process-of-creating-a-new-sd-card-image-release
|
||||
|
||||
### Requirements:
|
||||
* amd64 Laptop or Server connected to the internet via a LAN cable
|
||||
* [`Ubuntu Live`](https://releases.ubuntu.com/focal/ubuntu-20.04.4-desktop-amd64.iso) USB Stick to start on a clean system
|
||||
* [`Ubuntu Live`](https://releases.ubuntu.com/focal/ubuntu-20.04.5-desktop-amd64.iso) USB Stick to start on a clean system
|
||||
* `Installation medium`: min 8GB SDcard / USB stick to install the base image from
|
||||
* `OS disk`: min 32 GB Endurance type SDcard or USB SSD to run the operating system on
|
||||
* (`Data disk`: a new, minimum 1TB SSD is recommended - not needed to create the image release)
|
||||
@ -251,7 +221,7 @@ Work notes partially based on: https://github.com/rootzoll/raspiblitz/blob/v1.7/
|
||||
* can be prepared any time on a separate computer and can reuse the Installation medium
|
||||
|
||||
### Boot Ubuntu Live from USB
|
||||
* Start [`Ubuntu Live`](https://releases.ubuntu.com/focal/ubuntu-20.04.4-desktop-amd64.iso) from USB stick
|
||||
* Start [`Ubuntu Live`](https://releases.ubuntu.com/focal/ubuntu-20.04.5-desktop-amd64.iso) from USB stick
|
||||
* Under Settings: best to set correct keyboard language & power settings to prevent monitor turn off
|
||||
|
||||
### Download and verify the base image
|
||||
@ -299,7 +269,7 @@ Work notes partially based on: https://github.com/rootzoll/raspiblitz/blob/v1.7/
|
||||
* Insert the installation medium to the USB and power up - boot from USB.
|
||||
* Continue to work on the screen of the laptop or a connected monitor
|
||||
* Install Debian with the defaults:
|
||||
* leave the root oassword empty (root user disabled)
|
||||
* leave the root password empty (root user disabled)
|
||||
* create a new user called `pi`, set the password to `raspiblitz`
|
||||
* use a single partition for the OS
|
||||
* Choose: `Guided - use entire disk`
|
||||
@ -307,7 +277,7 @@ Work notes partially based on: https://github.com/rootzoll/raspiblitz/blob/v1.7/
|
||||
* All files in one partition
|
||||
* Can remove the `Swap` partition - a swap file will be created on the Data disk later
|
||||
* At the `Software selection` choose:
|
||||
* Debian dekstop environment
|
||||
* Debian desktop environment
|
||||
* GNOME (could be other as preferred)
|
||||
* SSH server
|
||||
* standard system utilities
|
||||
@ -343,7 +313,7 @@ Work notes partially based on: https://github.com/rootzoll/raspiblitz/blob/v1.7/
|
||||
* Remove the `Installation medium` and the `Ubuntu Live` USB stick and the LAN cable
|
||||
#### Start Tails
|
||||
* Connect the `Tails USB Stick` (make it stay offline)
|
||||
* Boot Tails and set and Admin password in Additioanl Settings (will need it to work with the disk)
|
||||
* Boot Tails and set and Admin password in Additional Settings (will need it to work with the disk)
|
||||
* Set the screen to not switch off: Settings > Power -> Blank screen - Never
|
||||
#### Import the signing keys
|
||||
* Connect USB stick with GPG signing keys - decrypt drive if needed
|
||||
@ -386,8 +356,8 @@ Work notes partially based on: https://github.com/rootzoll/raspiblitz/blob/v1.7/
|
||||
* Upload the new image to server - put the .sig file and .sha256 next to it
|
||||
* Copy the sha256sum to GitHub README and update the download link
|
||||
|
||||
## Verify the downloaded image
|
||||
### Linux instructions
|
||||
### Verify the downloaded image
|
||||
#### Linux instructions
|
||||
* Open a terminal in the directory with the downloaded files
|
||||
```
|
||||
raspiblitz-amd64-vX.X.X-YEAR-MONTH-DAY.img.gz
|
||||
@ -416,7 +386,7 @@ Work notes partially based on: https://github.com/rootzoll/raspiblitz/blob/v1.7/
|
||||
# raspiblitz-amd64-vX.X.X-YEAR-MONTH-DAY.img.gz: OK
|
||||
```
|
||||
|
||||
## Create a torrent
|
||||
### Create a torrent
|
||||
* Create Torrent file from image (for example with Transmission / qbBittorrent) and place in the `home.admin/assets` folder & link on README
|
||||
* Tracker list recommended to be used with the torrent:
|
||||
```
|
||||
@ -449,8 +419,3 @@ Work notes partially based on: https://github.com/rootzoll/raspiblitz/blob/v1.7/
|
||||
# Compare the sha256 hash to the hash of the image file (Look for the output 'OK'):
|
||||
shasum -c *.sha256
|
||||
```
|
||||
## Switch off sleep, suspend and hibernation
|
||||
* Run in the terminal:
|
||||
```
|
||||
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
|
||||
```
|
||||
|
@ -21,18 +21,8 @@
|
||||
"ssh_username": "vagrant",
|
||||
"type": "virtualbox-iso",
|
||||
"vboxmanage": [
|
||||
[
|
||||
"modifyvm",
|
||||
"{{.Name}}",
|
||||
"--memory",
|
||||
"1024"
|
||||
],
|
||||
[
|
||||
"modifyvm",
|
||||
"{{.Name}}",
|
||||
"--cpus",
|
||||
"1"
|
||||
]
|
||||
["modifyvm", "{{.Name}}", "--memory", "1024"],
|
||||
["modifyvm", "{{.Name}}", "--cpus", "1"]
|
||||
],
|
||||
"vm_name": "raspiblitz-amd64"
|
||||
}
|
||||
@ -63,10 +53,9 @@
|
||||
],
|
||||
"variables": {
|
||||
"branch": "dev",
|
||||
"github_user": "rootzoll",
|
||||
"iso_checksum": "2af8f43d4a7ab852151a7f630ba596572213e17d3579400b5648eba4cc974ed0",
|
||||
"github_user": "raspiblitz",
|
||||
"iso_checksum": "23ab444503069d9ef681e3028016250289a33cc7bab079259b73100daee0af66",
|
||||
"iso_checksum_type": "sha256",
|
||||
"iso_url": "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-10.6.0-amd64-netinst.iso"
|
||||
"iso_url": "https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-12.2.0-amd64-netinst.iso"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ if [ "${CHOICE}" = "GPIO" ]; then
|
||||
sudo apt-mark hold raspberrypi-bootloader
|
||||
sudo ./LCD35-show
|
||||
else
|
||||
sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf
|
||||
sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf 2>/dev/null
|
||||
sudo mkdir /etc/X11/xorg.conf.d
|
||||
sudo cp ./usr/tft35a-overlay.dtb /boot/overlays/
|
||||
sudo cp ./usr/tft35a-overlay.dtb /boot/overlays/tft35a.dtbo
|
||||
@ -79,7 +79,7 @@ elif [ "${CHOICE}" = "HDMI" ]; then
|
||||
sudo chmod -R 755 LCD-show
|
||||
cd LCD-show/
|
||||
#sudo ./MPI3508-show
|
||||
sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf
|
||||
sudo rm -rf /etc/X11/xorg.conf.d/40-libinput.conf 2>/dev/null
|
||||
|
||||
if [ "${baseimage}" != "dietpi" ]; then
|
||||
sudo cp -rf ./boot/config-35-480X320.txt /boot/config.txt
|
||||
|
709
build_sdcard.sh
Executable file → Normal file
@ -1,9 +0,0 @@
|
||||
# Raspiblitz Case: Standard
|
||||
|
||||
This is a raspiblitz case prototype. The standard file (Raspiblitz_standard.stl) should be modified to fit your HDD.
|
||||
|
||||
#### To Do
|
||||
|
||||
* Update the HDD container to fit the standard HDD model from the raspiblitz amazon buylist. (Toshiba HDTB420EK3AA 2TB Canvio Basics 2.5-Inch USB 3.0 Portable External Hard Drive - Black)
|
||||
|
||||
* Add a cool lightning bolt to improve the design.
|
272
ci/README.md
Normal file
@ -0,0 +1,272 @@
|
||||
<!-- omit in toc -->
|
||||
# Automated builds
|
||||
|
||||
<details>
|
||||
<summary>Table of Contents</summary>
|
||||
|
||||
- [Ready made images for arm64-rpi](#ready-made-images-for-arm64-rpi)
|
||||
- [Ready made images for amd64 (x86)](#ready-made-images-for-amd64-x86)
|
||||
- [Write the image to a disk connected with USB](#write-the-image-to-a-disk-connected-with-usb)
|
||||
- [Prepare the disk](#prepare-the-disk)
|
||||
- [Option 1 - rite the .qcow2 file directly to disk with `qemu-image dd`](#option-1---rite-the-qcow2-file-directly-to-disk-with-qemu-image-dd)
|
||||
- [Option 2 - convert the .qcow2 volume to a raw disk image](#option-2---convert-the-qcow2-volume-to-a-raw-disk-image)
|
||||
- [The first boot](#the-first-boot)
|
||||
- [Lean image with Gnome desktop (default image)](#lean-image-with-gnome-desktop-default-image)
|
||||
- [Extend the root partition (optional - recommended)](#extend-the-root-partition-optional---recommended)
|
||||
- [Add wifi driver (optional)](#add-wifi-driver-optional)
|
||||
- [Local build](#local-build)
|
||||
- [Generate an arm64-rpi image](#generate-an-arm64-rpi-image)
|
||||
- [Generate an amd64 image](#generate-an-amd64-image)
|
||||
- [amd64-lean-desktop-uefi-image](#amd64-lean-desktop-uefi-image)
|
||||
- [amd64-lean-server-legacyboot-image](#amd64-lean-server-legacyboot-image)
|
||||
- [Notes for the lean server image without Gnome desktop](#notes-for-the-lean-server-image-without-gnome-desktop)
|
||||
- [After the boot](#after-the-boot)
|
||||
- [Connect to wifi from the command line (optional)](#connect-to-wifi-from-the-command-line-optional)
|
||||
- [Add Gnome desktop to the server image (optional)](#add-gnome-desktop-to-the-server-image-optional)
|
||||
- [Fatpack images](#fatpack-images)
|
||||
- [Workflow notes](#workflow-notes)
|
||||
- [VNC](#vnc)
|
||||
- [Packer settings](#packer-settings)
|
||||
- [Flashing](#flashing)
|
||||
|
||||
</details>
|
||||
|
||||
## Ready made images for arm64-rpi
|
||||
* The images are built in GitHub actions
|
||||
* To see the downloadable artifacts will need to log in to GitHub
|
||||
* Find the latest successful build of the default amd64 image:
|
||||
https://github.com/raspiblitz/raspiblitz/actions/workflows/arm64-rpi-lean-image.yml?query=workflow%3Aarm64-rpi-lean-image-build+is%3Asuccess+branch%3Adev
|
||||
* unpack the artifact to the same directory
|
||||
```
|
||||
unzip ./raspiblitz-arm64-rpi-image-*.zip
|
||||
```
|
||||
* The resulting `raspiblitz-arm64-rpi-lean.img.gz` can be written to an SDcard directly with Balena Etcher
|
||||
|
||||
|
||||
## Ready made images for amd64 (x86)
|
||||
* The images are built in GitHub actions
|
||||
* To see the downloadable artifacts will need to log in to GitHub
|
||||
* Find the latest successful build of the default amd64 image:
|
||||
https://github.com/rootzoll/raspiblitz/actions/workflows/amd64-lean-image.yml?query=workflow%3Aamd64-lean-image-build+branch%3Adev+is%3Asuccess++
|
||||
```
|
||||
# unpack the artifact to the same directory
|
||||
unzip ./raspiblitz-amd64-image-*.zip
|
||||
# unpack the image
|
||||
gzip -dkv raspiblitz-amd64-debian-lean.qcow2.gz
|
||||
# install qemu-utils
|
||||
sudo apt install -y qemu-utils
|
||||
```
|
||||
### Write the image to a disk connected with USB
|
||||
|
||||
#### Prepare the disk
|
||||
* identify the connected disk with `lsblk` e.g., `/dev/sdk`
|
||||
* set the disk variable
|
||||
```
|
||||
# identify the USB connected disk
|
||||
lsblk
|
||||
# set the disk variable
|
||||
disk=/dev/sdk
|
||||
```
|
||||
* clean the existing partitions:
|
||||
```
|
||||
# unmount all partitions
|
||||
sudo umount ${disk}*
|
||||
# wipe the partition table
|
||||
sudo wipefs --all ${disk}
|
||||
```
|
||||
|
||||
#### Option 1 - rite the .qcow2 file directly to disk with `qemu-image dd`
|
||||
* requires less disk space - the .qcow2 volume is 8.1 GB
|
||||
```
|
||||
sudo qemu-img dd if=./raspiblitz-amd64-debian-lean.qcow2 of=${disk} bs=4M
|
||||
```
|
||||
|
||||
#### Option 2 - convert the .qcow2 volume to a raw disk image
|
||||
* the raw .img is 30GB
|
||||
```
|
||||
# convert
|
||||
qemu-img convert ./raspiblitz-amd64-debian-lean.qcow2 ./raspiblitz-amd64-debian-lean.img
|
||||
```
|
||||
* identify the connected disk with `lsblk` e.g., `/dev/sdk`
|
||||
* use [Balena Etcher](https://www.balena.io/etcher/)
|
||||
* or `dd` to write the .img to disk
|
||||
```
|
||||
sudo dd if=./raspiblitz-amd64-debian-lean.img of=${disk} bs=4M status=progress
|
||||
```
|
||||
|
||||
### The first boot
|
||||
#### Lean image with Gnome desktop (default image)
|
||||
* log in on screen:
|
||||
* username: `admin`
|
||||
* password: `raspiblitz`
|
||||
* start a terminal for guidance
|
||||
* alternatively connect with ssh over the LAN with the same username and password
|
||||
|
||||
#### Extend the root partition (optional - recommended)
|
||||
* The default image is 30GB. The partition can be extended to the full size of the disk.
|
||||
* The lvm partition can be extended while mounted so this step can be done later as well while the system is running.
|
||||
* CLI (recommended)
|
||||
```
|
||||
# identify the USB connected disk
|
||||
lsblk
|
||||
df -h
|
||||
# select the disk carefully
|
||||
disk="/dev/sde"
|
||||
# resize the extended partition to the full size of the disk
|
||||
sudo parted ${disk} -- resizepart 2 100%
|
||||
# resize the lvm partition to the full size of the disk
|
||||
sudo parted ${disk} -- resizepart 5 100%
|
||||
# extend the physical volume to size of the lvm partition
|
||||
sudo pvresize ${disk}5
|
||||
# extend the root lvm to the full free space and resize the filesystem
|
||||
sudo lvextend -r -l +100%FREE /dev/mapper/raspiblitz--amd64--vg-root
|
||||
```
|
||||
* GUI with GParted
|
||||
```
|
||||
# install
|
||||
sudo apt install gparted
|
||||
# start the gparted GUI
|
||||
sudo gparted
|
||||
# resize the extended partition to the full size of the disk
|
||||
# extend the lvm to the full free space and resize the filesystem (extends the swap space by default)
|
||||
# in CLI: extend the root lvm
|
||||
sudo lvextend -r -l +100%FREE /dev/mapper/raspiblitz--amd64--vg-root
|
||||
```
|
||||
|
||||
#### Add wifi driver (optional)
|
||||
* as in https://wiki.debian.org/iwlwifi
|
||||
* add the component `non-free` after `deb http://deb.debian.org/debian bullseye main` in `/etc/apt/sources.list`
|
||||
* install the wifi driver for the mentioned cards:
|
||||
```
|
||||
sudo apt update && sudo apt install firmware-iwlwifi
|
||||
```
|
||||
* alternatively download the deb package from: http://ftp.debian.org/debian/pool/non-free-firmware/f/firmware-nonfree/firmware-iwlwifi_20230210-5_all.deb
|
||||
* install with:
|
||||
```
|
||||
sudo dpkg -i firmware-iwlwifi_20230210-5_all.deb
|
||||
```
|
||||
|
||||
## Local build
|
||||
with the [Makefile](https://github.com/rootzoll/raspiblitz/blob/dev/Makefile)
|
||||
* needs ~20 GB free space
|
||||
* tested on:
|
||||
* Ubuntu Live (jammy)
|
||||
* Debian Bullseye Desktop
|
||||
* Preparation:
|
||||
```
|
||||
# change to a mountpoint with sufficient space (check with 'df -h')
|
||||
cd $HOME/
|
||||
# switch to root
|
||||
sudo su
|
||||
# install git and make
|
||||
apt update && apt install -y git make
|
||||
# download the repo (or your fork)
|
||||
git clone https://github.com/rootzoll/raspiblitz
|
||||
cd raspiblitz
|
||||
# checkout the desired branch
|
||||
git checkout dev
|
||||
```
|
||||
|
||||
### Generate an arm64-rpi image
|
||||
* The workflow locally and in github actions generates a .img raw format image for the Raspberry Pi.
|
||||
```
|
||||
make arm64-rpi-lean-image
|
||||
```
|
||||
* find the image and sha256 hashes in the `ci/arm64-rpi/packer-builder-arm` directory
|
||||
* the .img.gz file can be written to an SDcard directly with Balena Etcher
|
||||
|
||||
### Generate an amd64 image
|
||||
* The workflow locally and in github actions generates a .qcow2 format amd64 image.
|
||||
* When finished find the compressed .qcow2 image and sha256 hashes in the `ci/amd64/builds` directory
|
||||
|
||||
#### amd64-lean-desktop-uefi-image
|
||||
* lean image, Gnome desktop, UEFI boot
|
||||
* Tested with
|
||||
* written to disk and booted with UEFI
|
||||
```
|
||||
make amd64-lean-desktop-uefi-image
|
||||
```
|
||||
|
||||
#### amd64-lean-server-legacyboot-image
|
||||
* lean image, no desktop (cli only), legacy boot for old computers
|
||||
* Tested with
|
||||
* libvirt / virsh / virt-manager (https://virt-manager.org/)
|
||||
* written to disk and booted with legacy boot (non-UEFI / CSM mode)
|
||||
```
|
||||
make amd64-lean-server-legacyboot-image
|
||||
```
|
||||
|
||||
## Notes for the lean server image without Gnome desktop
|
||||
### After the boot
|
||||
* press any key to get to a login prompt after the splash screen
|
||||
* username: `admin`
|
||||
* password: `raspiblitz`
|
||||
|
||||
### Connect to wifi from the command line (optional)
|
||||
* if the wifi driver is included in the FOSS Debian distro
|
||||
* in the command line run the network manager interface to connect:
|
||||
```
|
||||
sudo nmtui
|
||||
```
|
||||
|
||||
#### Add Gnome desktop to the server image (optional)
|
||||
* Connect to the internet (easiest to plug in a LAN cable - use a USB - LAN adapter if have no port)
|
||||
```
|
||||
apt install gnome
|
||||
systemctl start gdm
|
||||
```
|
||||
|
||||
## Fatpack images
|
||||
* can open a browser and go to:
|
||||
* http://localhost
|
||||
* can also open the WebUI on another computer
|
||||
* Find the the RaspiBlitz_IP in your router dashboard, in the terminal prompt or with `hostname -I`
|
||||
* open: http://RaspiBlitz_IP
|
||||
|
||||
## Workflow notes
|
||||
The github workflow files are the equivalent of the Makefile commands run locally.
|
||||
The local repo owner (`GITHUB_ACTOR`) and branch (`GITHUB_HEAD_REF`) is picked up.
|
||||
The build_sdcard.sh is downloaded from the source branch and built with the options pack=[lean|fatpack] to set fatpack=[0|1].
|
||||
|
||||
The github workflow is running the job in an ubuntu-22.04 image.
|
||||
|
||||
The amd64 image is built with running a qemu VM
|
||||
* installs the base OS (Debian)
|
||||
* connects with ssh and runs the scripts including the build_sdcard.sh
|
||||
|
||||
The arm64-rpi image generation runs in Docker in github actions and without Docker locally.
|
||||
* the base image (RaspberryOS) is started in the qemu VM
|
||||
* Packer runs the build_sdcard.sh directly in the VM
|
||||
|
||||
After the image is built (and there is no exit with errors) the next steps are:
|
||||
* compute checksum of the qemu/raw image
|
||||
* compress the image with gzip
|
||||
* compute checksum of the compressed image
|
||||
* (in github actions: upload the artifacts in one .zip file)
|
||||
|
||||
### VNC
|
||||
* can follow the setup locally in VNC with the port stated in the first part of the logs eg: `Found available VNC port: 5900 on IP: 127.0.0.1`
|
||||
|
||||
### Packer settings
|
||||
* `disk_size` / `image_size` - the size op the raw image. The .qcow2 file is compressed.
|
||||
* `template` - image filename
|
||||
* `output_directory` - directory under builds where the image will be placed
|
||||
* the `pi` user is given passwordless sudo access and used for the image setup
|
||||
* use `file_checksum` instead of `file_checksum_url`. The image must be downloaded and verified with PGP manually to fill the field:
|
||||
```
|
||||
# image
|
||||
wget https://downloads.raspberrypi.org/raspios_arm64/images/raspios_arm64-2022-09-26/2022-09-22-raspios-bullseye-arm64.img.xz
|
||||
# signature
|
||||
wget https://downloads.raspberrypi.org/raspios_arm64/images/raspios_arm64-2022-09-26/2022-09-22-raspios-bullseye-arm64.img.xz.sig
|
||||
# hash
|
||||
wget https://downloads.raspberrypi.org/raspios_arm64/images/raspios_arm64-2022-09-26/2022-09-22-raspios-bullseye-arm64.img.xz.sha256
|
||||
|
||||
curl https://www.raspberrypi.org/raspberrypi_downloads.gpg.key | gpg --import
|
||||
|
||||
sha256sum -c 2022-09-22-raspios-bullseye-arm64.img.xz.sha256 && \
|
||||
gpg --verify 2022-09-22-raspios-bullseye-arm64.img.xz.sig
|
||||
|
||||
cat 2022-09-22-raspios-bullseye-arm64.img.xz.sha256
|
||||
```
|
||||
### Flashing
|
||||
* using `qemu-img dd bs=4M if=raspiblitz-amd64-debian-lean.qcow2 of=/dev/sdd` changed the UUID so it won't boot without editing GRUB
|
4
ci/amd64/_common/env.sh
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "# Display the environment variables"
|
||||
env
|
20
ci/amd64/_common/sshd.sh
Normal file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh -eux
|
||||
|
||||
SSHD_CONFIG="/etc/ssh/sshd_config"
|
||||
|
||||
# ensure that there is a trailing newline before attempting to concatenate
|
||||
sed -i -e '$a\' "$SSHD_CONFIG"
|
||||
|
||||
USEDNS="UseDNS no"
|
||||
if grep -q -E "^[[:space:]]*UseDNS" "$SSHD_CONFIG"; then
|
||||
sed -i "s/^\s*UseDNS.*/${USEDNS}/" "$SSHD_CONFIG"
|
||||
else
|
||||
echo "$USEDNS" >>"$SSHD_CONFIG"
|
||||
fi
|
||||
|
||||
GSSAPI="GSSAPIAuthentication no"
|
||||
if grep -q -E "^[[:space:]]*GSSAPIAuthentication" "$SSHD_CONFIG"; then
|
||||
sed -i "s/^\s*GSSAPIAuthentication.*/${GSSAPI}/" "$SSHD_CONFIG"
|
||||
else
|
||||
echo "$GSSAPI" >>"$SSHD_CONFIG"
|
||||
fi
|
115
ci/amd64/debian/build.amd64-debian.pkr.hcl
Normal file
@ -0,0 +1,115 @@
|
||||
variable "iso_name" { default = "debian-12.6.0-amd64-netinst.iso" }
|
||||
variable "iso_checksum" { default = "ade3a4acc465f59ca2496344aab72455945f3277a52afc5a2cae88cdc370fa12" }
|
||||
|
||||
variable "pack" { default = "lean" }
|
||||
variable "github_user" { default = "raspiblitz" }
|
||||
variable "branch" { default = "dev" }
|
||||
variable "desktop" { default = "none" }
|
||||
|
||||
variable "boot" { default = "uefi" }
|
||||
variable "preseed_file" { default = "preseed.cfg" }
|
||||
variable "hostname" { default = "raspiblitz-amd64" }
|
||||
|
||||
variable "disk_size" { default = "30000" }
|
||||
variable "memory" { default = "4096" }
|
||||
variable "cpus" { default = "4" }
|
||||
|
||||
locals {
|
||||
name_template = "${var.hostname}-debian-${var.pack}"
|
||||
bios_file = var.boot == "uefi" ? "OVMF.fd" : "bios-256k.bin"
|
||||
boot_command = var.boot == "uefi" ? [
|
||||
"<wait><wait><wait>c<wait><wait><wait>",
|
||||
"linux /install.amd/vmlinuz ",
|
||||
"auto=true ",
|
||||
"url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/${var.preseed_file} ",
|
||||
"hostname=${var.hostname} ",
|
||||
"domain=${var.hostname}.local ",
|
||||
"interface=auto ",
|
||||
"vga=788 noprompt quiet --<enter>",
|
||||
"initrd /install.amd/initrd.gz<enter>",
|
||||
"boot<enter>"
|
||||
] : [
|
||||
"<esc><wait>install <wait>",
|
||||
"<wait><wait><wait><wait><wait><wait><wait><wait><wait><wait><wait><wait><wait><wait><wait><wait> preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/${var.preseed_file} <wait>",
|
||||
"debian-installer=en_US.UTF-8 <wait>",
|
||||
"auto <wait>",
|
||||
"locale=en_US.UTF-8 <wait>",
|
||||
"kbd-chooser/method=us <wait>",
|
||||
"keyboard-configuration/xkb-keymap=us <wait>",
|
||||
"netcfg/get_hostname=${var.hostname} <wait>",
|
||||
"netcfg/get_domain=${var.hostname}.local <wait>",
|
||||
"fb=false <wait>",
|
||||
"debconf/frontend=noninteractive <wait>",
|
||||
"console-setup/ask_detect=false <wait>",
|
||||
"console-keymaps-at/keymap=us <wait>",
|
||||
"grub-installer/bootdev=default <wait>",
|
||||
"<enter><wait>"
|
||||
]
|
||||
}
|
||||
|
||||
source "qemu" "debian" {
|
||||
boot_command = local.boot_command
|
||||
boot_wait = "5s"
|
||||
cpus = var.cpus
|
||||
disk_size = var.disk_size
|
||||
http_directory = "./http"
|
||||
iso_checksum = var.iso_checksum
|
||||
iso_url = "https://cdimage.debian.org/cdimage/release/current/amd64/iso-cd/${var.iso_name}"
|
||||
memory = var.memory
|
||||
output_directory = "../builds/${local.name_template}-qemu"
|
||||
shutdown_command = "echo 'raspiblitz' | sudo /sbin/shutdown -hP now"
|
||||
ssh_password = "raspiblitz"
|
||||
ssh_port = 22
|
||||
ssh_timeout = "10000s"
|
||||
ssh_username = "pi"
|
||||
format = "qcow2"
|
||||
vm_name = "${local.name_template}.qcow2"
|
||||
headless = false
|
||||
vnc_bind_address = "127.0.0.1"
|
||||
vnc_port_max = 5900
|
||||
vnc_port_min = 5900
|
||||
qemuargs = [
|
||||
["-m", var.memory],
|
||||
["-bios", local.bios_file],
|
||||
["-display", "none"]
|
||||
]
|
||||
}
|
||||
|
||||
build {
|
||||
description = "Can't use variables here yet!"
|
||||
sources = ["source.qemu.debian"]
|
||||
|
||||
provisioner "shell" {
|
||||
environment_vars = [
|
||||
"HOME_DIR=/home/pi",
|
||||
"github_user=${var.github_user}",
|
||||
"branch=${var.branch}",
|
||||
"pack=${var.pack}",
|
||||
"desktop=${var.desktop}"
|
||||
]
|
||||
|
||||
execute_command = "echo 'raspiblitz' | {{.Vars}} sudo -S -E sh -eux '{{.Path}}'"
|
||||
expect_disconnect = true
|
||||
scripts = [
|
||||
"./../_common/env.sh",
|
||||
"./scripts/update.sh",
|
||||
"./../_common/sshd.sh",
|
||||
"./scripts/networking.sh",
|
||||
"./scripts/sudoers.sh",
|
||||
"./scripts/systemd.sh",
|
||||
"./scripts/build.raspiblitz.sh",
|
||||
"./scripts/cleanup.sh"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
packer {
|
||||
required_version = ">= 1.7.0, < 2.0.0"
|
||||
|
||||
required_plugins {
|
||||
qemu = {
|
||||
source = "github.com/hashicorp/qemu"
|
||||
version = ">= 1.0.0, < 2.0.0"
|
||||
}
|
||||
}
|
||||
}
|
72
ci/amd64/debian/http/preseed.cfg
Normal file
@ -0,0 +1,72 @@
|
||||
# https://github.com/chef/bento/blob/main/packer_templates/http/debian/preseed.cfg
|
||||
# https://www.debian.org/releases/stable/example-preseed.txt
|
||||
# https://github.com/tylert/packer-build/blob/master/source/debian/12_bookworm/base-uefi.preseed
|
||||
# variables: https://github.com/tylert/packer-build/blob/master/source/debian/12_bookworm/base-uefi.pkr.hcl
|
||||
|
||||
# Locale Setup
|
||||
d-i debian-installer/language string en
|
||||
d-i debian-installer/country string US
|
||||
d-i debian-installer/locale string en_US.UTF-8
|
||||
# d-i localechooser/supported-locales multiselect en_CA.UTF-8 fr_CA.UTF-8 zh_CN.UTF-8
|
||||
# d-i pkgsel/install-language-support boolean true
|
||||
|
||||
# Keyboard Setup
|
||||
d-i keyboard-configuration/xkb-keymap select us
|
||||
|
||||
# Clock Setup
|
||||
# d-i time/zone string Canada/Eastern
|
||||
d-i time/zone string UTC
|
||||
d-i clock-setup/utc boolean true
|
||||
# set above to false if making a bootable USB to run on same system as Windows
|
||||
|
||||
# Network Setup
|
||||
d-i netcfg/get_hostname string raspiblitz-amd64
|
||||
d-i netcfg/get_domain string
|
||||
# https://bugs.launchpad.net/ubuntu/+source/netcfg/+bug/713385
|
||||
d-i netcfg/choose_interface select auto
|
||||
# make sure you also add "interface=auto" to your boot command too
|
||||
# https://bugs.launchpad.net/ubuntu/+source/netcfg/+bug/713385
|
||||
|
||||
# User Setup
|
||||
d-i passwd/root-login boolean false
|
||||
d-i passwd/root-password-again password raspiblitz
|
||||
d-i passwd/root-password password raspiblitz
|
||||
d-i passwd/user-fullname string pi
|
||||
d-i passwd/user-uid string 1000
|
||||
d-i passwd/user-password password raspiblitz
|
||||
d-i passwd/user-password-again password raspiblitz
|
||||
d-i passwd/username string pi
|
||||
|
||||
# Package Setup
|
||||
d-i hw-detect/load_firmware boolean false
|
||||
d-i hw-detect/load_media boolean false
|
||||
apt-cdrom-setup apt-setup/cdrom/set-first boolean false
|
||||
d-i mirror/country string manual
|
||||
d-i mirror/http/hostname string httpredir.debian.org
|
||||
d-i mirror/http/directory string /debian
|
||||
d-i mirror/http/proxy string
|
||||
d-i apt-setup/contrib boolean true
|
||||
d-i apt-setup/non-free boolean true
|
||||
|
||||
tasksel tasksel/first multiselect ssh-server, standard
|
||||
d-i pkgsel/include string sudo bzip2 acpid cryptsetup zlib1g-dev wget curl dkms fuse make nfs-common net-tools cifs-utils rsync
|
||||
d-i pkgsel/install-language-support boolean false
|
||||
d-i pkgsel/update-policy select none
|
||||
d-i pkgsel/upgrade select full-upgrade
|
||||
|
||||
popularity-contest popularity-contest/participate boolean false
|
||||
|
||||
# Drive setup
|
||||
d-i partman-auto-lvm/guided_size string max
|
||||
d-i partman-auto/choose_recipe select atomic
|
||||
d-i partman-auto/method string lvm
|
||||
d-i partman-lvm/confirm boolean true
|
||||
d-i partman-lvm/confirm_nooverwrite boolean true
|
||||
d-i partman-lvm/device_remove_lvm boolean true
|
||||
d-i partman/choose_partition select finish
|
||||
d-i partman/confirm boolean true
|
||||
d-i partman/confirm_nooverwrite boolean true
|
||||
d-i partman/confirm_write_new_label boolean true
|
||||
|
||||
# Final Setup
|
||||
d-i finish-install/reboot_in_progress note
|
19
ci/amd64/debian/scripts/build.raspiblitz.sh
Normal file
@ -0,0 +1,19 @@
|
||||
#!/bin/sh -eux
|
||||
|
||||
echo 'Download the build_sdcard.sh script ...'
|
||||
wget https://raw.githubusercontent.com/${github_user}/raspiblitz/${branch}/build_sdcard.sh
|
||||
|
||||
if [ ${pack} = "fatpack" ]; then
|
||||
fatpack="1"
|
||||
else
|
||||
fatpack="0"
|
||||
fi
|
||||
|
||||
if [ "${desktop}" = "gnome" ]; then
|
||||
echo 'Add Gnome desktop'
|
||||
export DEBIAN_FRONTEND=none
|
||||
sudo apt install gnome -y
|
||||
fi
|
||||
|
||||
echo 'Build RaspiBlitz ...'
|
||||
bash build_sdcard.sh -f ${fatpack} -u ${github_user} -b ${branch} -d headless -t false -w off -i false
|
55
ci/amd64/debian/scripts/cleanup.sh
Normal file
@ -0,0 +1,55 @@
|
||||
#!/bin/sh -eux
|
||||
|
||||
echo "remove linux-headers"
|
||||
dpkg --list \
|
||||
| awk '{ print $2 }' \
|
||||
| grep 'linux-headers' \
|
||||
| xargs apt-get -y purge;
|
||||
|
||||
echo "remove specific Linux kernels, such as linux-image-4.9.0-13-amd64 but keeps the current kernel and does not touch the virtual packages"
|
||||
dpkg --list \
|
||||
| awk '{ print $2 }' \
|
||||
| grep 'linux-image-[234].*' \
|
||||
| grep -v `uname -r` \
|
||||
| xargs apt-get -y purge;
|
||||
|
||||
echo "remove linux-source package"
|
||||
dpkg --list \
|
||||
| awk '{ print $2 }' \
|
||||
| grep linux-source \
|
||||
| xargs apt-get -y purge;
|
||||
|
||||
echo "remove obsolete networking packages"
|
||||
apt-get -y purge ppp pppconfig pppoeconf;
|
||||
|
||||
echo "remove popularity-contest package"
|
||||
apt-get -y purge popularity-contest;
|
||||
|
||||
echo "remove installation-report package"
|
||||
apt-get -y purge installation-report;
|
||||
|
||||
echo "autoremoving packages and cleaning apt data"
|
||||
apt-get -y autoremove;
|
||||
apt-get -y clean;
|
||||
|
||||
echo "remove /var/cache"
|
||||
find /var/cache -type f -exec rm -rf {} \;
|
||||
|
||||
echo "truncate any logs that have built up during the install"
|
||||
find /var/log -type f -exec truncate --size=0 {} \;
|
||||
|
||||
echo "blank netplan machine-id (DUID) so machines get unique ID generated on boot"
|
||||
truncate -s 0 /etc/machine-id
|
||||
|
||||
echo "remove the contents of /tmp and /var/tmp"
|
||||
rm -rf /tmp/* /var/tmp/*
|
||||
|
||||
echo "force a new random seed to be generated"
|
||||
rm -f /var/lib/systemd/random-seed
|
||||
|
||||
echo "delete the SSH keys (will be recreated on the first boot)"
|
||||
rm -f /etc/ssh/ssh_host_*
|
||||
|
||||
echo "clear the history so our install isn't there"
|
||||
rm -f /root/.wget-hsts
|
||||
export HISTSIZE=0
|
14
ci/amd64/debian/scripts/networking.sh
Normal file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh -eux
|
||||
|
||||
# Disable Predictable Network Interface names and use eth0
|
||||
sed -i 's/en[[:alnum:]]*/eth0/g' /etc/network/interfaces
|
||||
sed -i 's/GRUB_CMDLINE_LINUX="\(.*\)"/GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0 \1"/g' /etc/default/grub
|
||||
update-grub
|
||||
|
||||
# Adding a 2 sec delay to the interface up, to make the dhclient happy
|
||||
echo "pre-up sleep 2" >>/etc/network/interfaces
|
||||
|
||||
# needed for resolvconf installed in build_sdcard.sh
|
||||
apt-get install resolvconf -y
|
||||
echo 'nameserver 1.1.1.1' >/etc/resolv.conf
|
||||
echo 'nameserver 8.8.8.8' >>/etc/resolv.conf
|
9
ci/amd64/debian/scripts/sudoers.sh
Normal file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh -eux
|
||||
|
||||
# Only add the secure path line if it is not already present
|
||||
grep -q 'secure_path' /etc/sudoers \
|
||||
|| sed -i -e '/Defaults\s\+env_reset/a Defaults\tsecure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"' /etc/sudoers;
|
||||
|
||||
# Set up password-less sudo for the pi user
|
||||
echo 'pi ALL=(ALL) NOPASSWD:ALL' >/etc/sudoers.d/99_pi;
|
||||
chmod 440 /etc/sudoers.d/99_pi;
|
4
ci/amd64/debian/scripts/systemd.sh
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh -eux
|
||||
|
||||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=751636
|
||||
apt-get install libpam-systemd
|
19
ci/amd64/debian/scripts/update.sh
Normal file
@ -0,0 +1,19 @@
|
||||
#!/bin/sh -eux
|
||||
|
||||
arch="$(uname -r | sed 's/^.*[0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}\(-[0-9]\{1,2\}\)-//')"
|
||||
debian_version="$(lsb_release -r | awk '{print $2}')"
|
||||
major_version="$(echo $debian_version | awk -F. '{print $1}')"
|
||||
|
||||
# Disable systemd apt timers/services
|
||||
systemctl stop apt-daily.timer
|
||||
systemctl stop apt-daily-upgrade.timer
|
||||
systemctl disable apt-daily.timer
|
||||
systemctl disable apt-daily-upgrade.timer
|
||||
systemctl mask apt-daily.service
|
||||
systemctl mask apt-daily-upgrade.service
|
||||
systemctl daemon-reload
|
||||
|
||||
## leave update and upgrade to the build_sdcard.sh
|
||||
#apt-get update
|
||||
#apt-get -y upgrade linux-image-$arch
|
||||
#apt-get -y install linux-headers-$(uname -r)
|
33
ci/amd64/packer.build.amd64-debian.sh
Normal file
@ -0,0 +1,33 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
sudo apt-get update
|
||||
|
||||
# install packer
|
||||
if ! packer version 2>/dev/null; then
|
||||
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
|
||||
sudo apt-add-repository -y "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
|
||||
sudo apt-get update
|
||||
echo -e "\nInstalling packer..."
|
||||
sudo apt-get install -y packer
|
||||
else
|
||||
echo "# Packer is installed"
|
||||
fi
|
||||
|
||||
# install qemu
|
||||
echo "# Install qemu ..."
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y qemu-system
|
||||
|
||||
# set vars
|
||||
echo "# Setting the variables: $*"
|
||||
source ../set_variables.sh
|
||||
set_variables "$@"
|
||||
|
||||
# Build the image
|
||||
echo "# Build the image ..."
|
||||
cd debian
|
||||
packer init -upgrade .
|
||||
command="PACKER_LOG=1 packer build ${vars} -only=qemu packer.build.amd64-debian.hcl"
|
||||
echo "# Running: $command"
|
||||
if [ ${#vars} -eq 0 ];then exit 1;fi
|
||||
PACKER_LOG=1 packer build ${vars} -only=qemu.debian build.amd64-debian.pkr.hcl || exit 1
|
78
ci/arm64-rpi/build.arm64-rpi.pkr.hcl
Normal file
@ -0,0 +1,78 @@
|
||||
variable "pack" { default = "lean" }
|
||||
variable "github_user" { default = "raspiblitz" }
|
||||
variable "branch" { default = "dev" }
|
||||
variable "image_link" { default = "https://downloads.raspberrypi.org/raspios_arm64/images/raspios_arm64-2024-03-15/2024-03-15-raspios-bookworm-arm64.img.xz" }
|
||||
variable "image_checksum" { default = "7e53a46aab92051d523d7283c080532bebb52ce86758629bf1951be9b4b0560f" }
|
||||
variable "image_size" { default = "20G" }
|
||||
|
||||
source "arm" "raspiblitz-arm64-rpi" {
|
||||
file_checksum_type = "sha256"
|
||||
file_checksum = var.image_checksum
|
||||
file_target_extension = "xz"
|
||||
file_unarchive_cmd = ["xz", "--decompress", "$ARCHIVE_PATH"]
|
||||
file_urls = [var.image_link]
|
||||
image_build_method = "resize"
|
||||
image_chroot_env = ["PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin"]
|
||||
image_partitions {
|
||||
filesystem = "vfat"
|
||||
mountpoint = "/boot"
|
||||
name = "boot"
|
||||
size = "256M"
|
||||
start_sector = "8192"
|
||||
type = "c"
|
||||
}
|
||||
image_partitions {
|
||||
filesystem = "ext4"
|
||||
mountpoint = "/"
|
||||
name = "root"
|
||||
size = "0"
|
||||
start_sector = "532480"
|
||||
type = "83"
|
||||
}
|
||||
image_path = "raspiblitz-arm64-rpi-${var.pack}.img"
|
||||
image_size = var.image_size
|
||||
image_type = "dos"
|
||||
qemu_binary_destination_path = "/usr/bin/qemu-arm-static"
|
||||
qemu_binary_source_path = "/usr/bin/qemu-arm-static"
|
||||
}
|
||||
|
||||
build {
|
||||
sources = ["source.arm.raspiblitz-arm64-rpi"]
|
||||
|
||||
provisioner "shell" {
|
||||
inline = [
|
||||
"echo 'nameserver 1.1.1.1' > /etc/resolv.conf",
|
||||
"echo 'nameserver 8.8.8.8' >> /etc/resolv.conf",
|
||||
"echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections",
|
||||
"apt-get update",
|
||||
"apt-get install -y sudo wget",
|
||||
"apt-get -y autoremove",
|
||||
"apt-get -y clean",
|
||||
"touch /boot/ssh",
|
||||
"echo 'pi:$6$TE7HmruYY9EaNiKP$Vz0inJ6gaoJgJvQrC5z/HMDRMTN2jKhiEnG83tc1Jsw7lli5MYdeA83g3NOVCsBaTVW4mUBiT/1ZRWYdofVQX0' > /boot/userconf"
|
||||
]
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
environment_vars = [
|
||||
"github_user=${var.github_user}",
|
||||
"branch=${var.branch}",
|
||||
"pack=${var.pack}"
|
||||
]
|
||||
script = "./build.raspiblitz.sh"
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
inline = [
|
||||
"echo '# delete the SSH keys (will be recreated on the first boot)'",
|
||||
"rm -f /etc/ssh/ssh_host_*",
|
||||
"echo 'OK'",
|
||||
]
|
||||
}
|
||||
|
||||
provisioner "shell" {
|
||||
inline = [
|
||||
"if [ \"${var.pack}\" = \"base\" ]; then echo 'Adding stop file to /boot/'; touch /boot/stop; fi"
|
||||
]
|
||||
}
|
||||
}
|
18
ci/arm64-rpi/build.raspiblitz.sh
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh -eux
|
||||
|
||||
echo 'Download the build_sdcard.sh script ...'
|
||||
wget https://raw.githubusercontent.com/${github_user}/raspiblitz/${branch}/build_sdcard.sh
|
||||
|
||||
if [ "${pack}" = "fatpack" ]; then
|
||||
fatpack="1"
|
||||
display="lcd"
|
||||
else
|
||||
fatpack="0"
|
||||
display="headless"
|
||||
fi
|
||||
|
||||
# make /dev/shm world writable for qemu
|
||||
sudo chmod 777 /dev/shm
|
||||
|
||||
echo 'Build RaspiBlitz ...'
|
||||
bash build_sdcard.sh -f ${fatpack} -u ${github_user} -b ${branch} -t false -w off -i false -d ${display}
|
72
ci/arm64-rpi/packer.build.arm64-rpi.local.sh
Normal file
@ -0,0 +1,72 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
echo -e "\n# Install dependencies with apt"
|
||||
if [ "$(uname -n)" = "ubuntu" ]; then
|
||||
sudo add-apt-repository -y universe
|
||||
fi
|
||||
|
||||
# Install dependencies
|
||||
# needed on Ubuntu Live ('lsb_release -cs': jammy)
|
||||
sudo apt install -y qemu-user-static || exit 1
|
||||
|
||||
# from https://github.com/mkaczanowski/packer-builder-arm/blob/master/docker/Dockerfile
|
||||
sudo apt install -y \
|
||||
wget \
|
||||
curl \
|
||||
ca-certificates \
|
||||
dosfstools \
|
||||
fdisk \
|
||||
gdisk \
|
||||
kpartx \
|
||||
libarchive-tools \
|
||||
parted \
|
||||
psmisc \
|
||||
qemu-utils \
|
||||
sudo \
|
||||
xz-utils || exit 1
|
||||
|
||||
echo -e "\n# Install Packer..."
|
||||
if ! packer version 2>/dev/null; then
|
||||
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
|
||||
sudo apt-add-repository -y "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
|
||||
sudo apt-get update -y && sudo apt-get install packer -y || exit 1
|
||||
else
|
||||
echo "# Packer is installed"
|
||||
fi
|
||||
|
||||
echo -e "\n# Install Go"
|
||||
export PATH=$PATH:/usr/local/go/bin
|
||||
# https://go.dev/dl/
|
||||
GOVERSION="1.20.6"
|
||||
GOHASH="b945ae2bb5db01a0fb4786afde64e6fbab50b67f6fa0eb6cfa4924f16a7ff1eb"
|
||||
if ! go version 2>/dev/null | grep "${GOVERSION}"; then
|
||||
wget --progress=bar:force https://go.dev/dl/go${GOVERSION}.linux-amd64.tar.gz
|
||||
echo "${GOHASH} go${GOVERSION}.linux-amd64.tar.gz" | sha256sum -c - || exit 1
|
||||
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go${GOVERSION}.linux-amd64.tar.gz
|
||||
sudo rm -rf go${GOVERSION}.linux-amd64.tar.gz
|
||||
else
|
||||
echo "# Go ${GOVERSION} is installed"
|
||||
fi
|
||||
|
||||
echo -e "\n# Download the packer-builder-arm plugin"
|
||||
git clone https://github.com/mkaczanowski/packer-builder-arm
|
||||
cd packer-builder-arm
|
||||
# https://github.com/mkaczanowski/packer-builder-arm/releases
|
||||
git reset --hard "v1.0.7"
|
||||
echo -e "\n# Build the packer-builder-arm plugin"
|
||||
go mod download
|
||||
go build || exit 1
|
||||
|
||||
# set vars
|
||||
echo "# Setting the variables: $*"
|
||||
# running from the ci/arm64-rpi/packer-builder-arm directory
|
||||
source ../../set_variables.sh
|
||||
set_variables "$@"
|
||||
|
||||
cp ../build.arm64-rpi.pkr.hcl ./
|
||||
cp ../build.raspiblitz.sh ./
|
||||
|
||||
echo -e "\n# Build the image"
|
||||
command="packer build ${vars} build.arm64-rpi.pkr.hcl"
|
||||
echo "# Running: $command"
|
||||
$command || exit 1
|
15
ci/arm64-rpi/packer.build.arm64-rpi.sh
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
# set vars
|
||||
echo "# Setting the variables: $*"
|
||||
source ../set_variables.sh
|
||||
set_variables "$@"
|
||||
|
||||
# build the image in docker
|
||||
echo -e "\nBuild the image..."
|
||||
# from https://hub.docker.com/r/mkaczanowski/packer-builder-arm/tags
|
||||
command="docker run --rm --privileged -v /dev:/dev -v ${PWD}:/build \
|
||||
mkaczanowski/packer-builder-arm@sha256:0ff8ce0cf33e37be6c351c8bcb2643835c7f3525b7f591808b91c04238d45695 \
|
||||
build ${vars} build.arm64-rpi.pkr.hcl"
|
||||
echo "# Running: $command"
|
||||
$command || exit 1
|
300
ci/packer.sh
Normal file
@ -0,0 +1,300 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#########################################################################
|
||||
# script to trigger packer image build on a debian LIVE system
|
||||
# see FAQ.dev.md for instructions
|
||||
##########################################################################
|
||||
|
||||
# YOUR REPO (REPLACE WITH YOUR OWN FORK IF NEEDED)
|
||||
REPO="https://github.com/raspiblitz/raspiblitz"
|
||||
|
||||
# folders to store the build results
|
||||
BUILDFOLDER="images"
|
||||
|
||||
# check if started with sudo
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "error='run as root / may use sudo'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# usage info
|
||||
echo "packer.sh [BRANCH] [arm|x86] [min|fat] [?lastcommithash]"
|
||||
echo "Build RaspiBlitz install images on a Debian LIVE system"
|
||||
echo "From repo (change in script is needed):"
|
||||
echo $REPO
|
||||
echo "Results will be stored in:"
|
||||
echo $BUILDFOLDER
|
||||
echo "Start this script in the root of an writable 128GB NTFS formatted USB drive."
|
||||
|
||||
# check if internet is available
|
||||
if ping -c 1 "1.1.1.1" &> /dev/null; then
|
||||
echo "# checking internet"
|
||||
else
|
||||
echo "error='script needs internet connection to run'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# get parameters
|
||||
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||
|
||||
# by input
|
||||
read -p "Press ENTER to continue or CTRL+C to exit"
|
||||
read -p "Enter the branch to build: " BRANCH
|
||||
read -p "Enter the architecture to build (arm|x86): " ARCH
|
||||
read -p "Enter the type to build (min|fat): " TYPE
|
||||
read -p "Enter the last commit hash to check (optional): " COMMITHASH
|
||||
|
||||
else
|
||||
|
||||
# by command line
|
||||
BRANCH=$1
|
||||
ARCH=$2
|
||||
TYPE=$3
|
||||
COMMITHASH=$4
|
||||
|
||||
fi
|
||||
|
||||
# check if branch is set
|
||||
if [ ${#BRANCH} -eq 0 ]; then
|
||||
echo "error='branch not set'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check if arch is set
|
||||
if [ ${#ARCH} -eq 0 ]; then
|
||||
echo "error='ARCH not set'"
|
||||
exit 1
|
||||
fi
|
||||
if [ "$ARCH" != "arm" ] && [ "$ARCH" != "x86" ]; then
|
||||
echo "error='ARCH not supported'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check if type is set
|
||||
if [ ${#TYPE} -eq 0 ]; then
|
||||
echo "error='TYPE not set'"
|
||||
exit 1
|
||||
fi
|
||||
if [ "$TYPE" != "min" ] && [ "$TYPE" != "fat" ]; then
|
||||
echo "error='TYPE not supported'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# install git and make
|
||||
apt update && apt install -y git make
|
||||
|
||||
# clean old repo
|
||||
rm -rf raspiblitz 2>/dev/null
|
||||
|
||||
# download the repo
|
||||
git clone $REPO
|
||||
if [ $? -gt 0 ]; then
|
||||
echo "# REPO: ${REPO}"
|
||||
echo "error='git clone failed'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd raspiblitz
|
||||
|
||||
# checkout the desired branch
|
||||
git checkout $BRANCH
|
||||
if [ $? -gt 0 ]; then
|
||||
cd ..
|
||||
rm -rf raspiblitz 2>/dev/null
|
||||
echo "# BRANCH: ${BRANCH}"
|
||||
echo "error='git checkout BRANCH failed'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check commit hash if set
|
||||
if [ ${#COMMITHASH} -gt 0 ]; then
|
||||
echo "# CHECKING COMMITHASH"
|
||||
actualCOMMITHASH=$(git log -1 --format=%H)
|
||||
echo "# actual(${actualCOMMITHASH}) ?= wanted(${COMMITHASH})"
|
||||
matches=$(echo "${actualCOMMITHASH}" | grep -c "${COMMITHASH}")
|
||||
if [ ${matches} -eq 0 ]; then
|
||||
cd ..
|
||||
rm -rf raspiblitz 2>/dev/null
|
||||
echo "error='COMMITHASH of branch does not match'"
|
||||
exit 1
|
||||
fi
|
||||
echo "# COMMITHASH CHECK OK"
|
||||
else
|
||||
echo "# NO COMMITHASH CHECK"
|
||||
fi
|
||||
|
||||
# make sure make build runs thru
|
||||
safedir=$(realpath ./ci/arm64-rpi/packer-builder-arm)
|
||||
echo "# Setting safe.directory to: ${safedir}"
|
||||
git config --global --add safe.directory "${safedir}"
|
||||
|
||||
# get code version
|
||||
codeVersion=$(cat ./home.admin/_version.info | grep 'codeVersion="' | cut -d'"' -f2)
|
||||
if [ ${#codeVersion} -eq 0 ]; then
|
||||
echo "error='codeVersion not found'"
|
||||
exit 1
|
||||
fi
|
||||
echo "# RaspiBlitz Version: ${codeVersion}"
|
||||
|
||||
# get date as string formatted like YEAR-MONTH-DAY
|
||||
dateString=$(date +%Y-%m-%d)
|
||||
echo "# Date: ${dateString}"
|
||||
|
||||
if [ "${ARCH}" == "arm" ] && [ "${TYPE}" == "min" ]; then
|
||||
PACKERTARGET="arm64-rpi-lean-image"
|
||||
PACKERBUILDPATH="./raspiblitz/ci/arm64-rpi/packer-builder-arm/raspiblitz-arm64-rpi-lean.img"
|
||||
PACKERFINALFILE="raspiblitz-min-v${codeVersion}-${dateString}.img"
|
||||
elif [ "${ARCH}" == "arm" ] && [ "${TYPE}" == "fat" ]; then
|
||||
PACKERTARGET="arm64-rpi-fatpack-image"
|
||||
PACKERBUILDPATH="./raspiblitz/ci/arm64-rpi/packer-builder-arm/TODO" #TODO
|
||||
PACKERFINALFILE="raspiblitz-fat-v${codeVersion}-${dateString}.img"
|
||||
elif [ "${ARCH}" == "x86" ] && [ "${TYPE}" == "min" ]; then
|
||||
PACKERTARGET="amd64-lean-server-legacyboot-image"
|
||||
PACKERBUILDPATH="./raspiblitz/ci/amd64/builds/raspiblitz-amd64-debian-lean-qemu/raspiblitz-amd64-debian-lean.qcow2"
|
||||
PACKERFINALFILE="raspiblitz-amd64-min-v${codeVersion}-${dateString}.qcow2"
|
||||
else
|
||||
echo "error='$ARCH-$TYPE not supported'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "# PACKER TARGET: ${PACKERTARGET}"
|
||||
echo "# PACKER BUILD PATH: ${PACKERBUILDPATH}"
|
||||
echo "# PACKER FINAL FILE: ${PACKERFINALFILE}"
|
||||
|
||||
# check if file already exists
|
||||
if [ -f "./${BUILDFOLDER}/${PACKERFINALFILE}.img.gz" ]; then
|
||||
echo "error='image already exists'"
|
||||
echo "# delete ./${BUILDFOLDER}/${PACKERFINALFILE}.img.gz (and all .sha256 & .sig) before trying again"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# prevent monitor to go to sleep during long non-interactive build
|
||||
xset s off
|
||||
gsettings set org.gnome.desktop.screensaver idle-activation-enabled false
|
||||
|
||||
echo "# BUILDING '${PACKERTARGET}' ###########################################"
|
||||
make $PACKERTARGET
|
||||
|
||||
# check if build was successful
|
||||
if [ $? -gt 0 ]; then
|
||||
echo "# BUILDING FAILED ###########################################"
|
||||
echo "# Check the output above for errors."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "# BUILDING SUCCESS ###########################################"
|
||||
|
||||
echo "# moving build to timestamped folder ./${BUILDFOLDER}"
|
||||
cd ..
|
||||
mkdir "${BUILDFOLDER}" 2>/dev/null
|
||||
|
||||
#check that Build folder exists
|
||||
if [ ! -d "./${BUILDFOLDER}" ]; then
|
||||
echo "# FAILED CREATING BUILD FOLDER: ./${BUILDFOLDER}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# move .gz file to build folder
|
||||
mv "${PACKERBUILDPATH}.gz" "./${BUILDFOLDER}/${PACKERFINALFILE}.gz"
|
||||
if [ $? -gt 0 ]; then
|
||||
echo "# FAILED MOVING .gz"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# move gz.sha256 file to build folder
|
||||
mv "${PACKERBUILDPATH}.gz.sha256" "./${BUILDFOLDER}/${PACKERFINALFILE}.gz.sha256"
|
||||
if [ $? -gt 0 ]; then
|
||||
echo "# FAILED MOVING .gz.sha256"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# move sha256 file to build folder
|
||||
mv "${PACKERBUILDPATH}.sha256" "./${BUILDFOLDER}/${PACKERFINALFILE}.sha256"
|
||||
if [ $? -gt 0 ]; then
|
||||
echo "# FAILED MOVING .sha256"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# special handling for qcow2
|
||||
if [ "${ARCH}" == "x86" ]; then
|
||||
echo "# decompressing qcow2"
|
||||
gunzip "./${BUILDFOLDER}/${PACKERFINALFILE}.gz"
|
||||
echo "# converting qcow2 to raw"
|
||||
qemu-img convert -f qcow2 -O raw "./${BUILDFOLDER}/${PACKERFINALFILE}.qcow2" "./${BUILDFOLDER}/${PACKERFINALFILE}.img"
|
||||
if [ $? -gt 0 ]; then
|
||||
echo "# FAILED CONVERTING qcow2 to raw"
|
||||
exit 1
|
||||
fi
|
||||
echo "# compressing raw"
|
||||
gzip -9 "./${BUILDFOLDER}/${PACKERFINALFILE}.img"
|
||||
if [ $? -gt 0 ]; then
|
||||
echo "# FAILED COMPRESSING raw"
|
||||
exit 1
|
||||
fi
|
||||
echo "# removing raw"
|
||||
rm "./${BUILDFOLDER}/${PACKERFINALFILE}.img"
|
||||
if [ $? -gt 0 ]; then
|
||||
echo "# FAILED REMOVING raw"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
echo "# clean up"
|
||||
rm -rf ./../raspiblitz 2>/dev/null
|
||||
|
||||
echo "# SIGN & SECURE IMAGE ###########################################"
|
||||
echo
|
||||
|
||||
# security check that internet is cut
|
||||
echo "# MANUAL ACTION NEEDED:"
|
||||
echo "# Cut the connection to the internet before signing the image."
|
||||
echo
|
||||
echo "# Press RETURN to continue..."
|
||||
read -r -p "" key
|
||||
if ping -c 1 "1.1.1.1" &> /dev/null; then
|
||||
echo "# FAIL - Internet connection is up - EXITING SCRIPT"
|
||||
exit 1
|
||||
else
|
||||
echo "# OK - Internet connection is cut"
|
||||
fi
|
||||
echo
|
||||
|
||||
# Note down the SHA256 checksum of the image
|
||||
echo "# MANUAL ACTION NEEDED:"
|
||||
echo "# Note down the SHA256 checksum of the image:"
|
||||
echo
|
||||
cat ./${BUILDFOLDER}/${PACKERFINALFILE}.gz.sha256
|
||||
echo
|
||||
echo "# Press RETURN to continue..."
|
||||
read -r -p "" key
|
||||
|
||||
# import the signer keys
|
||||
echo "# MANUAL ACTION NEEDED:"
|
||||
echo "# Keep this terminal open and the 128GB stick connected."
|
||||
echo "# Additionalley connect and unlock the USB device with the signer keys."
|
||||
echo "# Open in Filemanager and use right-click 'Open in Termonal' and run:"
|
||||
echo "# sudo gpg --import ./sub.key"
|
||||
echo "# Close that second terminal and remove USB device with signer keys."
|
||||
echo
|
||||
echo "# Press RETURN to continue..."
|
||||
read -r -p "" key
|
||||
|
||||
# signing instructions
|
||||
echo "# MANUAL ACTION NEEDED:"
|
||||
echo "# Please wait infront of the screen until the signing process is asks you for the password."
|
||||
echo
|
||||
cd "${BUILDFOLDER}"
|
||||
gpg --output ${PACKERFINALFILE}.gz.sig --detach-sign ${PACKERFINALFILE}.gz
|
||||
if [ $? -gt 0 ]; then
|
||||
echo "# !!!!!!! SIGNING FAILED - redo manual before closing this terminbal !!!!!!!"
|
||||
echo "gpg --output ${PACKERFINALFILE}.gz.sig --detach-sign ${PACKERFINALFILE}.gz"
|
||||
else
|
||||
echo "# OK Signing successful."
|
||||
fi
|
||||
|
||||
# last notes
|
||||
echo
|
||||
echo "Close this terminal and eject your 128GB usb device."
|
||||
echo "Have fun with your build image on it under:"
|
||||
echo "${BUILDFOLDER}/${PACKERFINALFILE}.gz"
|
75
ci/set_variables.sh
Executable file
@ -0,0 +1,75 @@
|
||||
#!/bin/bash
|
||||
|
||||
function set_variables() {
|
||||
|
||||
declare -A params
|
||||
while (("$#")); do
|
||||
case "$1" in
|
||||
--pack)
|
||||
params[pack]="$2"
|
||||
shift 2
|
||||
;;
|
||||
--github_user)
|
||||
params[github_user]="$2"
|
||||
shift 2
|
||||
;;
|
||||
--branch)
|
||||
params[branch]="$2"
|
||||
shift 2
|
||||
;;
|
||||
# arm64-rpi
|
||||
--image_link)
|
||||
params[image_link]="$2"
|
||||
shift 2
|
||||
;;
|
||||
# arm64-rpi
|
||||
--image_checksum)
|
||||
params[image_checksum]="$2"
|
||||
shift 2
|
||||
;;
|
||||
# amd64
|
||||
# preseed.cfg
|
||||
--preseed_file)
|
||||
params[preseed_file]="$2"
|
||||
shift 2
|
||||
;;
|
||||
# amd64
|
||||
# uefi | bios
|
||||
--boot)
|
||||
params[boot]="$2"
|
||||
shift 2
|
||||
;;
|
||||
# amd64
|
||||
# none | gnome
|
||||
--desktop)
|
||||
params[desktop]="$2"
|
||||
shift 2
|
||||
;;
|
||||
--image_size)
|
||||
params[image_size]="$2"
|
||||
shift 2
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
break
|
||||
;;
|
||||
*)
|
||||
echo "Error: Invalid argument"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Reset the global vars string
|
||||
vars=""
|
||||
# Iterate over all keys in the params array
|
||||
for key in "${!params[@]}"; do
|
||||
# If the value for this key is not empty, add it to vars
|
||||
if [ -n "${params[$key]}" ]; then
|
||||
vars="$vars -var $key=${params[$key]}"
|
||||
fi
|
||||
done
|
||||
|
||||
export vars
|
||||
|
||||
}
|
@ -19,6 +19,7 @@ source <(/home/admin/_cache.sh get \
|
||||
system_ups_status \
|
||||
system_ups_battery \
|
||||
system_cpu_load \
|
||||
system_up_text \
|
||||
system_temp_celsius \
|
||||
system_temp_fahrenheit \
|
||||
runBehindTor \
|
||||
@ -275,7 +276,9 @@ ${color_yellow}${ln_publicColor}${ln_external}${color_gray}"
|
||||
|
||||
if [ "${joinmarket}" = "on" ];then
|
||||
# show JoinMarket stats in place of the LND URI only if the Yield Generator is running
|
||||
if [ $(sudo -u joinmarket pgrep -f "yg-privacyenhanced.py" 2>/dev/null | wc -l) -gt 2 ]; then
|
||||
if [ "$(sudo -u joinmarket pgrep -f "yg-privacyenhanced.py" 2>/dev/null | wc -l)" -gt 2 ] || \
|
||||
[ "$(curl -ksX GET https://127.0.0.1:28183/api/v1/session | jq .maker_running 2>/dev/null)" = true ]; then
|
||||
|
||||
trap 'rm -f "$JMstats"' EXIT
|
||||
JMstats=$(mktemp -p /dev/shm)
|
||||
sudo -u joinmarket /home/joinmarket/info.stats.sh > $JMstats
|
||||
@ -309,7 +312,8 @@ if [ "${blitzapi}" == "on" ]; then
|
||||
webuiinfo="Web Admin --> http://${internet_localip}"
|
||||
fi
|
||||
|
||||
datetime=$(date -R)
|
||||
datetime=$(date +"%d %b %T %z")
|
||||
datetime="${datetime} up ${system_up_text}"
|
||||
|
||||
stty sane
|
||||
sleep 1
|
||||
@ -324,7 +328,7 @@ ${color_yellow} ${color_gray}${network^} Fullnode${LNinfo} ${torIn
|
||||
${color_yellow} ,/ ${color_yellow}%s
|
||||
${color_yellow} ,'/ ${color_gray}%s
|
||||
${color_yellow} ,' / ${color_gray}%s, temp %s°C %s°F
|
||||
${color_yellow} ,' /_____ ${color_gray}Free Mem ${color_ram}${ram} ${color_gray} HDDuse ${color_hdd}%s${color_gray}
|
||||
${color_yellow} ,' /_____ ${color_gray}Free Mem ${color_ram}${ram} ${color_gray} HDD ${color_hdd}%s${color_gray}
|
||||
${color_yellow},'_____ ,' ${color_gray}SSH admin@${internet_localip}${color_gray} d${internet_rx} u${internet_tx}
|
||||
${color_yellow} / ,' ${color_gray}${webuiinfo}
|
||||
${color_yellow} / ,' ${color_gray}${network} ${color_green}${networkVersion}${color_gray}${chain}net ${networkConnectionsInfo}
|
||||
@ -351,25 +355,31 @@ else
|
||||
appInfoLine=""
|
||||
|
||||
# Electrum Server - electrs
|
||||
if [ "${ElectRS}" = "on" ]; then
|
||||
fileFlagExists=$(sudo ls /mnt/hdd/app-storage/electrs/initial-sync.done 2>/dev/null | grep -c 'initial-sync.done')
|
||||
if [ "${ElectRS}" == "on" ] && [ $fileFlagExists -eq 0 ]; then
|
||||
error=""
|
||||
source <(sudo /home/admin/config.scripts/bonus.electrs.sh status-sync 2>/dev/null)
|
||||
source <(/home/admin/config.scripts/bonus.electrs.sh status-sync 2>/dev/null)
|
||||
if [ ${#infoSync} -gt 0 ]; then
|
||||
appInfoLine="Electrum: ${infoSync}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# BTC RPC EXPLORER
|
||||
if [ "${BTCRPCexplorer}" = "on" ]; then
|
||||
# Electrum Server - fulcrum
|
||||
fileFlagExists=$(sudo ls /mnt/hdd/app-storage/fulcrum/initial-sync.done 2>/dev/null | grep -c 'initial-sync.done')
|
||||
if [ "${fulcrum}" == "on" ] && [ $fileFlagExists -eq 0 ]; then
|
||||
error=""
|
||||
source <(sudo /home/admin/config.scripts/bonus.btc-rpc-explorer.sh status 2>/dev/null)
|
||||
if [ ${#error} -gt 0 ]; then
|
||||
appInfoLine="ERROR BTC-RPC-Explorer: ${error} (try restart)"
|
||||
elif [ "${isIndexed}" = "0" ]; then
|
||||
appInfoLine="BTC-RPC-Explorer: ${indexInfo}"
|
||||
source <(/home/admin/config.scripts/bonus.fulcrum.sh status-sync 2>/dev/null)
|
||||
if [ ${#infoSync} -gt 0 ]; then
|
||||
appInfoLine="Fulcrum: ${infoSync}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Transaction Index
|
||||
source <(/home/admin/config.scripts/network.txindex.sh status)
|
||||
if [ "${txindex}" == "1" ] && [ "${isIndexed}" != "1" ]; then
|
||||
appInfoLine="Transaction Index: ${indexInfo}"
|
||||
fi
|
||||
|
||||
if [ ${#appInfoLine} -gt 0 ]; then
|
||||
echo "${appInfoLine}"
|
||||
fi
|
||||
|
@ -64,8 +64,8 @@ configFile="/mnt/hdd/raspiblitz.conf"
|
||||
infoFile="/home/admin/raspiblitz.info"
|
||||
|
||||
# check that user is pi
|
||||
if [ "$USER" != "pi" ]; then
|
||||
echo "plz run as user pi --> su pi"
|
||||
if [ "$USER" != "pi" ] && [ "$USER" != "root" ]; then
|
||||
echo "plz run as user pi or with sudo"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -86,17 +86,19 @@ while :
|
||||
|
||||
# get config info if already available (with state value)
|
||||
source ${infoFile}
|
||||
source <(/home/admin/_cache.sh get state message)
|
||||
|
||||
configExists=$(ls ${configFile} 2>/dev/null | grep -c '.conf')
|
||||
configExists=$(ls "${configFile}" 2>/dev/null | grep -c '.conf')
|
||||
if [ ${configExists} -eq 1 ]; then
|
||||
source ${configFile}
|
||||
source <(/home/admin/config.scripts/network.aliases.sh getvars)
|
||||
fi
|
||||
|
||||
if [ "${setupPhase}" != "done" ] || [ "${state}" == "reboot" ] || [ "${state}" == "shutdown" ] || [ "${state}" == "copytarget" ] || [ "${state}" == "copysource" ] || [ "${state}" == "copystation" ]; then
|
||||
if [ "${setupPhase}" != "done" ] || [ "${state}" == "reboot" ] || [ "${state}" == "shutdown" ] || [ "${state}" == "copytarget" ] || [ "${state}" == "copysource" ]; then
|
||||
|
||||
# show status info during boot & setup & repair on LCD
|
||||
if [ "${state}" == "" ]; then
|
||||
state="nostate"
|
||||
fi
|
||||
/home/admin/setup.scripts/eventInfoWait.sh "${state}" "${message}" lcd
|
||||
sleep 1
|
||||
continue
|
||||
|
@ -86,15 +86,15 @@ fi
|
||||
if [ "${lit}" == "on" ]; then
|
||||
OPTIONS+=(LIT "LIT (loop, pool, faraday)")
|
||||
fi
|
||||
if [ "${sparko}" == "on" ]; then
|
||||
OPTIONS+=(SPARKO "Sparko Webwallet")
|
||||
fi
|
||||
if [ "${spark}" == "on" ]; then
|
||||
OPTIONS+=(SPARK "Spark Wallet")
|
||||
if [ "${lndg}" == "on" ]; then
|
||||
OPTIONS+=(LNDG "LNDg (auto-rebalance, auto-fees)")
|
||||
fi
|
||||
if [ "${ElectRS}" == "on" ]; then
|
||||
OPTIONS+=(ELECTRS "Electrum Rust Server")
|
||||
fi
|
||||
if [ "${fulcrum}" == "on" ]; then
|
||||
OPTIONS+=(FULCRUM "Fulcrum Electrum Server")
|
||||
fi
|
||||
if [ "${BTCRPCexplorer}" == "on" ]; then
|
||||
OPTIONS+=(EXPLORE "BTC RPC Explorer")
|
||||
fi
|
||||
@ -111,6 +111,9 @@ fi
|
||||
if [ "${loop}" == "on" ]; then
|
||||
OPTIONS+=(LOOP "Loop In/Out Service")
|
||||
fi
|
||||
if [ "${lndk}" == "on" ]; then
|
||||
OPTIONS+=(LNDK "LND BOLT 12 privacy")
|
||||
fi
|
||||
if [ "${mempoolExplorer}" == "on" ]; then
|
||||
OPTIONS+=(MEMPOOL "Mempool Space")
|
||||
fi
|
||||
@ -120,12 +123,18 @@ fi
|
||||
if [ "${joinmarket}" == "on" ]; then
|
||||
OPTIONS+=(JM "JoinMarket with JoininBox")
|
||||
fi
|
||||
if [ "${jam}" == "on" ]; then
|
||||
OPTIONS+=(JAM "Jam (JoinMarket WebUI)")
|
||||
fi
|
||||
if [ "${faraday}" == "on" ]; then
|
||||
OPTIONS+=(FARADAY "Faraday Channel Management")
|
||||
fi
|
||||
if [ "${bos}" == "on" ]; then
|
||||
OPTIONS+=(BOS "Balance of Satoshis")
|
||||
fi
|
||||
#if [ "${lnproxy}" == "on" ]; then
|
||||
# OPTIONS+=(LNPROXY "lnproxy server")
|
||||
#fi
|
||||
if [ "${pyblock}" == "on" ]; then
|
||||
OPTIONS+=(PYBLOCK "PyBlock")
|
||||
fi
|
||||
@ -147,21 +156,20 @@ fi
|
||||
if [ "${chantools}" == "on" ]; then
|
||||
OPTIONS+=(CHANTOOLS "ChannelTools (Fund Rescue)")
|
||||
fi
|
||||
if [ "${homer}" == "on" ]; then
|
||||
OPTIONS+=(HOMER "Homer Dashboard")
|
||||
CHOICE_HEIGHT=$((CHOICE_HEIGHT+1))
|
||||
fi
|
||||
if [ "${circuitbreaker}" == "on" ]; then
|
||||
OPTIONS+=(CIRCUIT "Circuitbreaker (LND firewall)")
|
||||
fi
|
||||
if [ "${tallycoinConnect}" == "on" ]; then
|
||||
OPTIONS+=(TALLY "Tallycoin Connect")
|
||||
OPTIONS+=(CIRCUITBREAKER "Circuitbreaker (LND firewall)")
|
||||
fi
|
||||
if [ "${squeaknode}" == "on" ]; then
|
||||
OPTIONS+=(SQUEAKNODE "Squeaknode")
|
||||
fi
|
||||
if [ "${itchysats}" == "on" ]; then
|
||||
OPTIONS+=(ITCHYSATS "Show ItchySats details")
|
||||
if [ "${lightningtipbot}" == "on" ]; then
|
||||
OPTIONS+=(LIGHTNINGTIPBOT "Show LightningTipBot details")
|
||||
fi
|
||||
if [ "${fints}" == "on" ]; then
|
||||
OPTIONS+=(FINTS "Show FinTS/HBCI details")
|
||||
fi
|
||||
if [ "${labelbase}" == "on" ]; then
|
||||
OPTIONS+=(LABELBASE "Labelbase (UTXO labeling)")
|
||||
fi
|
||||
|
||||
# dont offer to switch to "testnet view for now" - so no wswitch back to mainnet needed
|
||||
@ -177,9 +185,7 @@ OPTIONS+=(SETTINGS "Node Settings & Options")
|
||||
OPTIONS+=(SERVICES "Additional Apps & Services")
|
||||
OPTIONS+=(SYSTEM "Monitoring & Configuration")
|
||||
OPTIONS+=(CONNECT "Connect Apps & Show Credentials")
|
||||
if [ "${lightning}" == "lnd" ] || [ "${lnd}" == "on" ]; then
|
||||
OPTIONS+=(SUBSCRIBE "Manage Subscriptions")
|
||||
fi
|
||||
OPTIONS+=(SUBSCRIBE "Manage Subscriptions")
|
||||
OPTIONS+=(PASSWORD "Change Passwords")
|
||||
|
||||
if [ "${touchscreen}" == "1" ]; then
|
||||
@ -217,7 +223,7 @@ case $CHOICE in
|
||||
echo ""
|
||||
echo -en "Screen is updating in a loop .... press 'x' now to get back to menu."
|
||||
read -n 1 -t 6 keyPressed
|
||||
echo -en "\rGathering information to update info ... please wait. \n"
|
||||
echo -en "\rGathering information to update info ... please wait. \n"
|
||||
|
||||
# check if user wants to abort session
|
||||
if [ "${keyPressed}" = "x" ]; then
|
||||
@ -259,14 +265,14 @@ case $CHOICE in
|
||||
ELECTRS)
|
||||
/home/admin/config.scripts/bonus.electrs.sh menu
|
||||
;;
|
||||
FULCRUM)
|
||||
/home/admin/config.scripts/bonus.fulcrum.sh menu
|
||||
;;
|
||||
LIT)
|
||||
/home/admin/config.scripts/bonus.lit.sh menu
|
||||
;;
|
||||
SPARKO)
|
||||
/home/admin/config.scripts/cl-plugin.sparko.sh menu mainnet
|
||||
;;
|
||||
SPARK)
|
||||
/home/admin/config.scripts/cl.spark.sh menu mainnet
|
||||
LNDG)
|
||||
/home/admin/config.scripts/bonus.lndg.sh menu
|
||||
;;
|
||||
LNBITS)
|
||||
/home/admin/config.scripts/bonus.lnbits.sh menu
|
||||
@ -274,8 +280,11 @@ case $CHOICE in
|
||||
LNDMANAGE)
|
||||
/home/admin/config.scripts/bonus.lndmanage.sh menu
|
||||
;;
|
||||
LOOP)
|
||||
/home/admin/config.scripts/bonus.loop.sh menu
|
||||
LNDK)
|
||||
/home/admin/config.scripts/bonus.lndk.sh menu
|
||||
;;
|
||||
LIGHTNINGTIPBOT)
|
||||
/home/admin/config.scripts/bonus.lightningtipbot.sh menu
|
||||
;;
|
||||
MEMPOOL)
|
||||
/home/admin/config.scripts/bonus.mempool.sh menu
|
||||
@ -286,11 +295,14 @@ case $CHOICE in
|
||||
JM)
|
||||
/home/admin/config.scripts/bonus.joinmarket.sh menu
|
||||
;;
|
||||
FARADAY)
|
||||
sudo /home/admin/config.scripts/bonus.faraday.sh menu
|
||||
JAM)
|
||||
/home/admin/config.scripts/bonus.jam.sh menu
|
||||
;;
|
||||
BOS)
|
||||
sudo /home/admin/config.scripts/bonus.bos.sh menu
|
||||
;;
|
||||
LNPROXY)
|
||||
sudo /home/admin/config.scripts/bonus.lnproxy.sh menu
|
||||
;;
|
||||
PYBLOCK)
|
||||
sudo /home/admin/config.scripts/bonus.pyblock.sh menu
|
||||
@ -298,22 +310,15 @@ case $CHOICE in
|
||||
THUB)
|
||||
sudo /home/admin/config.scripts/bonus.thunderhub.sh menu
|
||||
;;
|
||||
TALLY)
|
||||
sudo /home/admin/config.scripts/bonus.tallycoin-connect.sh menu
|
||||
;;
|
||||
ZEROTIER)
|
||||
sudo /home/admin/config.scripts/bonus.zerotier.sh menu
|
||||
;;
|
||||
POOL)
|
||||
sudo /home/admin/config.scripts/bonus.pool.sh menu
|
||||
;;
|
||||
SPHINX)
|
||||
sudo /home/admin/config.scripts/bonus.sphinxrelay.sh menu
|
||||
;;
|
||||
HELIPAD)
|
||||
sudo /home/admin/config.scripts/bonus.helipad.sh menu
|
||||
;;
|
||||
|
||||
SQUEAKNODE)
|
||||
/home/admin/config.scripts/bonus.squeaknode.sh menu
|
||||
;;
|
||||
@ -323,18 +328,21 @@ case $CHOICE in
|
||||
CHANTOOLS)
|
||||
sudo /home/admin/config.scripts/bonus.chantools.sh menu
|
||||
;;
|
||||
CIRCUIT)
|
||||
CIRCUITBREAKER)
|
||||
sudo /home/admin/config.scripts/bonus.circuitbreaker.sh menu
|
||||
;;
|
||||
LABELBASE)
|
||||
sudo /home/admin/config.scripts/bonus.labelbase.sh menu
|
||||
;;
|
||||
FINTS)
|
||||
sudo /home/admin/config.scripts/bonus.fints.sh menu
|
||||
;;
|
||||
TESTNETS)
|
||||
/home/admin/00parallelChainsMenu.sh
|
||||
;;
|
||||
;;
|
||||
SUBSCRIBE)
|
||||
/home/admin/config.scripts/blitz.subscriptions.py
|
||||
;;
|
||||
HOMER)
|
||||
sudo /home/admin/config.scripts/bonus.homer.sh menu
|
||||
;;
|
||||
SERVICES)
|
||||
/home/admin/00settingsMenuServices.sh
|
||||
;;
|
||||
|
@ -13,8 +13,6 @@ if [ ${#rtlWebinterface} -eq 0 ]; then rtlWebinterface="off"; fi
|
||||
if [ ${#lnd} -eq 0 ]; then lnd="off"; fi
|
||||
if [ ${#cl} -eq 0 ]; then cl="off"; fi
|
||||
if [ ${#crtlWebinterface} -eq 0 ]; then crtlWebinterface="off"; fi
|
||||
if [ ${#sparko} -eq 0 ]; then sparko="off"; fi
|
||||
if [ ${#spark} -eq 0 ]; then spark="off"; fi
|
||||
|
||||
# show select dialog
|
||||
echo "run dialog ..."
|
||||
@ -24,8 +22,6 @@ OPTIONS+=(l "LND on $CHAIN" ${lnd})
|
||||
OPTIONS+=(r "RTL for LND $CHAIN" ${rtlWebinterface})
|
||||
OPTIONS+=(c "Core Lightning on $CHAIN" ${cl})
|
||||
OPTIONS+=(t "RTL for CL on $CHAIN" ${crtlWebinterface})
|
||||
OPTIONS+=(s "Sparko for CL on $CHAIN" ${sparko})
|
||||
OPTIONS+=(m "Spark for CL on $CHAIN" ${spark})
|
||||
|
||||
CHOICES=$(dialog --title ' Additional Services ' \
|
||||
--checklist ' use spacebar to activate/de-activate ' \
|
||||
@ -145,50 +141,6 @@ else
|
||||
echo "RTL for CL $CHAIN Setting unchanged."
|
||||
fi
|
||||
|
||||
# sparko process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "s")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${sparko}" != "${choice}" ]; then
|
||||
echo "# Sparko on $CHAIN Setting changed .."
|
||||
anychange=1
|
||||
/home/admin/config.scripts/cl-plugin.sparko.sh ${choice} $CHAIN
|
||||
errorOnInstall=$?
|
||||
if [ "${choice}" = "on" ]; then
|
||||
if [ ${errorOnInstall} -eq 0 ]; then
|
||||
/home/admin/config.scripts/cl-plugin.sparko.sh menu $CHAIN
|
||||
else
|
||||
l1="# FAIL on Sparko on $CHAIN install #"
|
||||
l2="# Try manual install on terminal after reboot with:"
|
||||
l3="/home/admin/config.scripts/cl-plugin.sparko.sh on $CHAIN"
|
||||
dialog --title 'FAIL' --msgbox "${l1}\n${l2}\n${l3}" 7 65
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "# Sparko on $CHAIN Setting unchanged."
|
||||
fi
|
||||
|
||||
# spark process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "m")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${spark}" != "${choice}" ]; then
|
||||
echo "# Spark Wallet on $CHAIN Setting changed .."
|
||||
anychange=1
|
||||
/home/admin/config.scripts/cl.spark.sh ${choice} $CHAIN
|
||||
errorOnInstall=$?
|
||||
if [ "${choice}" = "on" ]; then
|
||||
if [ ${errorOnInstall} -eq 0 ]; then
|
||||
/home/admin/config.scripts/cl.spark.sh menu $CHAIN
|
||||
else
|
||||
l1="# FAIL on Spark Wallet on $CHAIN install #"
|
||||
l2="# Try manual install on terminal after reboot with:"
|
||||
l3="/home/admin/config.scripts/cl.spark.sh on $CHAIN"
|
||||
dialog --title 'FAIL' --msgbox "${l1}\n${l2}\n${l3}" 7 65
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "# Spark Wallet on $CHAIN Setting unchanged."
|
||||
fi
|
||||
|
||||
if [ ${anychange} -eq 0 ]; then
|
||||
dialog --msgbox "NOTHING CHANGED!\nUse Spacebar to check/uncheck services." 8 58
|
||||
exit 0
|
||||
|
@ -13,8 +13,6 @@ if [ ${#trtlWebinterface} -eq 0 ]; then trtlWebinterface="off"; fi
|
||||
if [ ${#tlnd} -eq 0 ]; then tlnd="off"; fi
|
||||
if [ ${#tcrtlWebinterface} -eq 0 ]; then tcrtlWebinterface="off"; fi
|
||||
if [ ${#tcl} -eq 0 ]; then tcl="off"; fi
|
||||
if [ ${#tsparko} -eq 0 ]; then tsparko="off"; fi
|
||||
if [ ${#tspark} -eq 0 ]; then tspark="off"; fi
|
||||
|
||||
# show select dialog
|
||||
echo "run dialog ..."
|
||||
@ -24,8 +22,6 @@ OPTIONS+=(l "LND on $CHAIN" ${tlnd})
|
||||
OPTIONS+=(r "RTL for LND $CHAIN" ${trtlWebinterface})
|
||||
OPTIONS+=(c "Core Lightning on $CHAIN" ${tcl})
|
||||
OPTIONS+=(t "RTL for CL on $CHAIN" ${tcrtlWebinterface})
|
||||
OPTIONS+=(s "Sparko for CL on $CHAIN" ${tsparko})
|
||||
OPTIONS+=(m "Spark Wallet fro CL on $CHAIN" ${tspark})
|
||||
|
||||
CHOICES=$(dialog --title ' Additional Services ' \
|
||||
--checklist ' use spacebar to activate/de-activate ' \
|
||||
@ -142,50 +138,6 @@ else
|
||||
echo "RTL for CL $CHAIN Setting unchanged."
|
||||
fi
|
||||
|
||||
# tsparko process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "s")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${tsparko}" != "${choice}" ]; then
|
||||
echo "# Sparko on $CHAIN Setting changed .."
|
||||
anychange=1
|
||||
/home/admin/config.scripts/cl-plugin.sparko.sh ${choice} $CHAIN
|
||||
errorOnInstall=$?
|
||||
if [ "${choice}" = "on" ]; then
|
||||
if [ ${errorOnInstall} -eq 0 ]; then
|
||||
/home/admin/config.scripts/cl-plugin.sparko.sh menu $CHAIN
|
||||
else
|
||||
l1="# FAIL on Sparko on $CHAIN install #"
|
||||
l2="# Try manual install on terminal after reboot with:"
|
||||
l3="/home/admin/config.scripts/cl-plugin.sparko.sh on $CHAIN"
|
||||
dialog --title 'FAIL' --msgbox "${l1}\n${l2}\n${l3}" 7 65
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "# Sparko on $CHAIN Setting unchanged."
|
||||
fi
|
||||
|
||||
# tspark process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "m")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${tspark}" != "${choice}" ]; then
|
||||
echo "# Spark Wallet on $CHAIN Setting changed .."
|
||||
anychange=1
|
||||
/home/admin/config.scripts/cl.spark.sh ${choice} $CHAIN
|
||||
errorOnInstall=$?
|
||||
if [ "${choice}" = "on" ]; then
|
||||
if [ ${errorOnInstall} -eq 0 ]; then
|
||||
/home/admin/config.scripts/cl.spark.sh menu $CHAIN
|
||||
else
|
||||
l1="# FAIL on Spark Wallet on $CHAIN install #"
|
||||
l2="# Try manual install on terminal after reboot with:"
|
||||
l3="/home/admin/config.scripts/cl.spark.sh on $CHAIN"
|
||||
dialog --title 'FAIL' --msgbox "${l1}\n${l2}\n${l3}" 7 65
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "# Spark Wallet on $CHAIN Setting unchanged."
|
||||
fi
|
||||
|
||||
if [ ${anychange} -eq 0 ]; then
|
||||
dialog --msgbox "NOTHING CHANGED!\nUse Spacebar to check/uncheck services." 8 58
|
||||
exit 0
|
||||
|
@ -13,7 +13,6 @@ source /mnt/hdd/raspiblitz.conf 2>/dev/null
|
||||
# INFOFILE - state data from bootstrap
|
||||
infoFile="/home/admin/raspiblitz.info"
|
||||
source ${infoFile}
|
||||
source <(/home/admin/_cache.sh get state message)
|
||||
|
||||
# check that basic system phase/state information is available
|
||||
if [ "${setupPhase}" == "" ] || [ "${state}" == "" ]; then
|
||||
@ -48,21 +47,6 @@ if [ "${copyInProgress}" = "1" ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
# special state: reindex was triggered
|
||||
if [ "${state}" = "reindex" ]; then
|
||||
echo "Re-Index in progress ... start monitoring:"
|
||||
/home/admin/config.scripts/network.reindex.sh
|
||||
exit
|
||||
fi
|
||||
|
||||
# special state: copystation
|
||||
if [ "${state}" = "copystation" ]; then
|
||||
echo "Copy Station is Running ..."
|
||||
echo "reboot to return to normal"
|
||||
sudo /home/admin/XXcopyStation.sh
|
||||
exit
|
||||
fi
|
||||
|
||||
#####################################
|
||||
# SSH MENU LOOP
|
||||
# this loop runs until user exits or
|
||||
@ -106,8 +90,7 @@ do
|
||||
network \
|
||||
chain \
|
||||
lightning \
|
||||
internet_localip \
|
||||
system_vm_vagrant \
|
||||
internet_localip
|
||||
)
|
||||
|
||||
# background.scan is not ready yet
|
||||
@ -118,7 +101,7 @@ do
|
||||
fi
|
||||
|
||||
#####################################
|
||||
# ALWAYS: Handle System States
|
||||
# ALWAYS: Handle System States
|
||||
#####################################
|
||||
|
||||
############################
|
||||
@ -133,7 +116,7 @@ do
|
||||
|
||||
# unlock c-lightning
|
||||
if [ "${lightning}" == "cl" ]; then
|
||||
/home/admin/config.scripts/cl.hsmtool.sh unlock
|
||||
/home/admin/config.scripts/cl.hsmtool.sh unlock ${chain}net
|
||||
sleep 5
|
||||
fi
|
||||
|
||||
@ -143,7 +126,7 @@ do
|
||||
# SETUP MENU
|
||||
#####################################
|
||||
|
||||
# when is needed & bootstrap process signals that it waits for user dialog
|
||||
# when is needed & bootstrap process signals that it waits for user dialog
|
||||
if [ "${setupPhase}" != "done" ] && [ "${state}" == "waitsetup" ]; then
|
||||
# push user to main menu
|
||||
echo "# controlSetupDialog.sh"
|
||||
@ -158,14 +141,14 @@ do
|
||||
# SETUP DONE DIALOGS
|
||||
#####################################
|
||||
|
||||
# when is needed & bootstrap process signals that it waits for user dialog
|
||||
# when is needed & bootstrap process signals that it waits for user dialog
|
||||
if [ "${setupPhase}" != "done" ] && [ "${state}" == "waitfinal" ]; then
|
||||
# push to final setup gui dialogs
|
||||
#echo "# controlFinalDialog.sh"
|
||||
/home/admin/setup.scripts/controlFinalDialog.sh
|
||||
# exit because controller will reboot at the end
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
# exit loop/script in case if system shutting down
|
||||
if [ "${state}" == "reboot" ] || [ "${state}" == "shutdown" ]; then
|
||||
@ -185,7 +168,7 @@ do
|
||||
fi
|
||||
|
||||
#####################################
|
||||
# MAKE SURE BLOCKCHAIN/LN IS SYNC
|
||||
# MAKE SURE BLOCKCHAIN/LN IS SYNC
|
||||
#####################################
|
||||
if [ "${setupPhase}" == "done" ] && [ "${state}" == "ready" ]; then
|
||||
if [ "${lightning}" = "cl" ]; then
|
||||
@ -194,11 +177,17 @@ do
|
||||
sleep 3
|
||||
continue
|
||||
fi
|
||||
else
|
||||
elif [ "${lightning}" = "lnd" ]; then
|
||||
if [ "${btc_default_synced}" != "1" ] || [ "${ln_default_ready}" == "0" ] || [ "${ln_default_sync_chain}" == "0" ] || [ "${ln_default_sync_initial_done}" == "0" ]; then
|
||||
/home/admin/setup.scripts/eventBlockchainSync.sh ssh
|
||||
sleep 3
|
||||
continue
|
||||
fi
|
||||
else
|
||||
if [ "${btc_default_synced}" != "1" ]; then
|
||||
/home/admin/setup.scripts/eventBlockchainSync.sh ssh
|
||||
sleep 3
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@ -236,7 +225,7 @@ do
|
||||
echo "The WORD SEED is not matching the channel.backup file."
|
||||
echo "Either there was an error in the word seed list or"
|
||||
echo "or the channel.backup file is from another RaspiBlitz."
|
||||
echo
|
||||
echo
|
||||
fi
|
||||
|
||||
# basic info on error
|
||||
@ -250,7 +239,7 @@ do
|
||||
else
|
||||
rm /home/admin/channel.backup
|
||||
dialog --title " OK Static-Channel-Backup IMPORT " --msgbox "
|
||||
LND accepted the channel.backup file you uploaded.
|
||||
LND accepted the channel.backup file you uploaded.
|
||||
It can now take up to an hour until you can see,
|
||||
if LND was able to recover funds from your channels.
|
||||
|
||||
@ -282,32 +271,13 @@ MAINMENU > REPAIR > REPAIR-LND > RETRYSCB
|
||||
fi
|
||||
|
||||
#####################################
|
||||
# DURING SETUP: Handle System States
|
||||
# DURING SETUP: Handle System States
|
||||
#####################################
|
||||
|
||||
if [ "${setupPhase}" != "done" ]; then
|
||||
|
||||
#echo "# DURING SETUP: Handle System State (${state})"
|
||||
|
||||
# when no HDD on Vagrant - just print info & exit (admin info & exit)
|
||||
if [ "${state}" == "noHDD" ] && [ ${system_vm_vagrant} != "0" ]; then
|
||||
echo "***********************************************************"
|
||||
echo "VAGRANT INFO"
|
||||
echo "***********************************************************"
|
||||
echo "To connect a HDD data disk to your VagrantVM:"
|
||||
echo "- shutdown VM with command: off"
|
||||
echo "- open your VirtualBox GUI and select RaspiBlitzVM"
|
||||
echo "- change the 'mass storage' settings"
|
||||
echo "- add a second 'Primary Slave' drive to the already existing controller"
|
||||
echo "- close VirtualBox GUI and run: vagrant up & vagrant ssh"
|
||||
echo "***********************************************************"
|
||||
echo "You can either create a new dynamic VDI with around 900GB or download"
|
||||
echo "a VDI with a presynced blockchain to speed up setup. If you dont have 900GB"
|
||||
echo "space on your laptop you can store the VDI file on an external drive."
|
||||
echo "***********************************************************"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# for all critical errors (admin info & exit)
|
||||
if [ "${state}" == "error" ] || [ "${state}" == "errorHDD" ]; then
|
||||
clear
|
||||
@ -331,6 +301,8 @@ MAINMENU > REPAIR > REPAIR-LND > RETRYSCB
|
||||
echo "https://github.com/rootzoll/raspiblitz#support"
|
||||
echo "command to shutdown --> off"
|
||||
exit 1
|
||||
elif [ "${state}" == "" ]; then
|
||||
echo "state(${state}) message(${message})"
|
||||
else
|
||||
# every other state just push as event to SSH frontend
|
||||
/home/admin/setup.scripts/eventInfoWait.sh "${state}" "${message}"
|
||||
@ -392,4 +364,4 @@ fi
|
||||
echo "Blitz command line options: blitzhelp"
|
||||
echo "Back to menus use command: raspiblitz"
|
||||
echo
|
||||
exit 0
|
||||
exit 0
|
||||
|
@ -6,7 +6,6 @@ source /home/admin/raspiblitz.info
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
|
||||
echo "services default values"
|
||||
if [ ${#autoPilot} -eq 0 ]; then autoPilot="off"; fi
|
||||
if [ ${#autoUnlock} -eq 0 ]; then autoUnlock="off"; fi
|
||||
if [ ${#runBehindTor} -eq 0 ]; then runBehindTor="off"; fi
|
||||
if [ ${#networkUPnP} -eq 0 ]; then networkUPnP="off"; fi
|
||||
@ -17,6 +16,7 @@ if [ ${#circuitbreaker} -eq 0 ]; then circuitbreaker="off"; fi
|
||||
if [ ${#clboss} -eq 0 ]; then clboss="off"; fi
|
||||
if [ ${#clEncryptedHSM} -eq 0 ]; then clEncryptedHSM="off"; fi
|
||||
if [ ${#clAutoUnlock} -eq 0 ]; then clAutoUnlock="off"; fi
|
||||
if [ ${#clWatchtowerClient} -eq 0 ]; then clWatchtowerClient="off"; fi
|
||||
if [ ${#blitzapi} -eq 0 ]; then blitzapi="off"; fi
|
||||
|
||||
echo "# map LND to on/off"
|
||||
@ -69,14 +69,6 @@ if [ ${touchscreen} -gt 0 ]; then
|
||||
touchscreenMenu='on'
|
||||
fi
|
||||
|
||||
echo "# map autopilot to on/off"
|
||||
lndAutoPilotOn=$(sudo cat /mnt/hdd/lnd/lnd.conf 2>/dev/null | grep -c 'autopilot.active=1')
|
||||
if [ ${lndAutoPilotOn} -eq 1 ]; then
|
||||
autoPilot="on"
|
||||
else
|
||||
autoPilot="off"
|
||||
fi
|
||||
|
||||
echo "# map clboss to on/off"
|
||||
clbossMenu='off'
|
||||
if [ "${clboss}" == "on" ]; then
|
||||
@ -95,11 +87,10 @@ if [ "${clAutoUnlock}" == "on" ]; then
|
||||
clAutoUnlockMenu='on'
|
||||
fi
|
||||
|
||||
echo "# map keysend to on/off (may take time)"
|
||||
keysend="on"
|
||||
source <(sudo /home/admin/config.scripts/lnd.keysend.sh status)
|
||||
if [ ${keysendOn} -eq 0 ]; then
|
||||
keysend="off"
|
||||
echo "# map clWatchtowerClient to on/off"
|
||||
clWatchtowerClientMenu='off'
|
||||
if [ "${clWatchtowerClient}" == "on" ]; then
|
||||
clWatchtowerClientMenu='on'
|
||||
fi
|
||||
|
||||
# show select dialog
|
||||
@ -112,7 +103,7 @@ OPTIONS+=(A 'Blitz API + WebUI' ${blitzapi})
|
||||
|
||||
# LCD options (only when running with LCD screen)
|
||||
if [ "${displayClass}" == "lcd" ]; then
|
||||
OPTIONS+=(s 'Touchscreen (experimental)' ${touchscreenMenu})
|
||||
# OPTIONS+=(s 'Touchscreen (experimental)' ${touchscreenMenu})
|
||||
OPTIONS+=(r 'LCD Rotate' ${lcdrotateMenu})
|
||||
fi
|
||||
|
||||
@ -126,15 +117,18 @@ if [ ${#runBehindTor} -eq 0 ] || [ "${runBehindTor}" = "off" ]; then
|
||||
fi
|
||||
OPTIONS+=(p 'Parallel Testnet/Signet' ${parallelTestnets})
|
||||
|
||||
|
||||
# Lightning options (only LND and/or CLN)
|
||||
if [ "${lndNode}" == "on" ] || [ "${clNode}" == "on" ]; then
|
||||
OPTIONS+=(x 'SCB/Emergency-Backup on Nextcloud' ${NextcloudBackup})
|
||||
OPTIONS+=(e 'SCB/Emergency-Backup USB Drive' ${LocalBackup})
|
||||
fi
|
||||
|
||||
# LND & options (only when running LND)
|
||||
OPTIONS+=(m 'LND LIGHTNING LABS NODE' ${lndNode})
|
||||
if [ "${lndNode}" == "on" ]; then
|
||||
OPTIONS+=(a '-LND Channel Autopilot' ${autoPilot})
|
||||
OPTIONS+=(k '-LND Accept Keysend' ${keysend})
|
||||
OPTIONS+=(c '-LND Circuitbreaker (firewall)' ${circuitbreaker})
|
||||
OPTIONS+=(u '-LND Auto-Unlock' ${autoUnlock})
|
||||
OPTIONS+=(x '-LND StaticChannelBackup on Nextcloud' ${NextcloudBackup})
|
||||
OPTIONS+=(e '-LND StaticChannelBackup USB Drive' ${LocalBackup})
|
||||
fi
|
||||
|
||||
# Core Lightning & options/PlugIns
|
||||
@ -142,6 +136,7 @@ OPTIONS+=(n 'CL CORE LIGHTNING NODE' ${clNode})
|
||||
if [ "${clNode}" == "on" ]; then
|
||||
OPTIONS+=(o '-CL CLBOSS Automatic Node Manager' ${clbossMenu})
|
||||
OPTIONS+=(h '-CL Wallet Encryption' ${clEncryptedHSMMenu})
|
||||
OPTIONS+=(w '-CL Watchtower Client' ${clWatchtowerClientMenu})
|
||||
if [ "${clEncryptedHSM}" == "on" ]; then
|
||||
OPTIONS+=(q '-CL Auto-Unlock' ${clAutoUnlockMenu})
|
||||
fi
|
||||
@ -172,8 +167,8 @@ if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${blitzapi}" != "${choice}" ]; then
|
||||
echo "Blitz API + webUI settings changed .."
|
||||
anychange=1
|
||||
sudo /home/admin/config.scripts/blitz.web.api.sh ${choice}
|
||||
sudo /home/admin/config.scripts/blitz.web.ui.sh ${choice}
|
||||
sudo /home/admin/config.scripts/blitz.web.api.sh ${choice} DEFAULT
|
||||
sudo /home/admin/config.scripts/blitz.web.ui.sh ${choice} DEFAULT
|
||||
errorOnInstall=$?
|
||||
if [ "${choice}" = "on" ]; then
|
||||
whiptail --title " Installed Blitz API + webUI" --msgbox "\
|
||||
@ -185,18 +180,6 @@ else
|
||||
echo "Blitz API + webUI Setting unchanged."
|
||||
fi
|
||||
|
||||
# LND AUTOPILOT process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "a")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${autoPilot}" != "${choice}" ] && [ "${lndNode}" == "on" ]; then
|
||||
echo "Autopilot Setting changed .."
|
||||
anychange=1
|
||||
sudo /home/admin/config.scripts/lnd.autopilot.sh ${choice}
|
||||
needsReboot=1
|
||||
else
|
||||
echo "Autopilot Setting unchanged."
|
||||
fi
|
||||
|
||||
# Dynamic Domain
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "y")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
@ -342,20 +325,6 @@ else
|
||||
echo "BackupdDevice setting unchanged."
|
||||
fi
|
||||
|
||||
# LND Keysend process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "k")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${keysend}" != "${choice}" ] && [ "${lndNode}" == "on" ]; then
|
||||
echo "keysend setting changed .."
|
||||
anychange=1
|
||||
sudo -u admin /home/admin/config.scripts/lnd.keysend.sh ${choice}
|
||||
sudo systemctl restart lnd
|
||||
dialog --msgbox "Accept Keysend on LND mainnet is now ${choice}.\n\nLND restarted - you might need to unlock wallet." 7 52
|
||||
sudo -u admin /home/admin/config.scripts/lnd.unlock.sh
|
||||
else
|
||||
echo "keysend setting unchanged."
|
||||
fi
|
||||
|
||||
# ZeroTier process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "z")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
@ -363,16 +332,8 @@ if [ "${zerotierSwitch}" != "${choice}" ]; then
|
||||
echo "zerotier setting changed .."
|
||||
anychange=1
|
||||
error=""
|
||||
source <(sudo -u admin /home/admin/config.scripts/bonus.zerotier.sh ${choice})
|
||||
if [ "${choice}" == "on" ]; then
|
||||
if [ ${#error} -eq 0 ]; then
|
||||
dialog --msgbox "Your RaspiBlitz joined the ZeroTier network." 6 46
|
||||
else
|
||||
if [ "${error}" != "cancel" ]; then
|
||||
dialog --msgbox "ZeroTier Error:\n${error}" 8 46
|
||||
fi
|
||||
fi
|
||||
else
|
||||
sudo -u admin /home/admin/config.scripts/bonus.zerotier.sh ${choice}
|
||||
if [ "${choice}" != "on" ]; then
|
||||
dialog --msgbox "ZeroTier is now OFF." 5 46
|
||||
fi
|
||||
|
||||
@ -414,26 +375,23 @@ if [ "${clNode}" != "${choice}" ]; then
|
||||
echo "# Core Lightning NODE Setting changed .."
|
||||
if [ "${choice}" = "on" ]; then
|
||||
echo "# turning ON"
|
||||
|
||||
/home/admin/config.scripts/cl.install.sh on mainnet
|
||||
# generate wallet from seedwords or just display (write to dev/null to not write seed words to logs)
|
||||
/home/admin/config.scripts/cl.hsmtool.sh new mainnet 1>/dev/null
|
||||
echo "Generating CL wallet seedwords .."
|
||||
/home/admin/config.scripts/cl.hsmtool.sh new mainnet noninteractive
|
||||
if [ "${testnet}" == "on" ]; then
|
||||
# no seed for testnet
|
||||
echo "Turn on CL testnet .."
|
||||
/home/admin/config.scripts/cl.install.sh on testnet
|
||||
fi
|
||||
if [ "${signet}" == "on" ]; then
|
||||
# no seed for signet
|
||||
echo "Turn on CL signet .."
|
||||
/home/admin/config.scripts/cl.install.sh on signet
|
||||
fi
|
||||
|
||||
# make sure that cln-grpc is on for the WebAPI
|
||||
/home/admin/config.scripts/cl-plugin.cln-grpc.sh install
|
||||
/home/admin/config.scripts/cl-plugin.cln-grpc.sh on
|
||||
|
||||
else
|
||||
echo "# turning OFF"
|
||||
/home/admin/config.scripts/cl-plugin.cln-grpc.sh off
|
||||
/home/admin/config.scripts/cl.install.sh off mainnet
|
||||
/home/admin/config.scripts/cl.install.sh off testnet
|
||||
/home/admin/config.scripts/cl.install.sh off signet
|
||||
@ -495,6 +453,28 @@ else
|
||||
echo "clAutoUnlock Setting unchanged."
|
||||
fi
|
||||
|
||||
# clWatchtowerClient process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "w")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${clWatchtowerClient}" != "${choice}" ] && [ "${clNode}" == "on" ]; then
|
||||
echo "CL WATCHTOWER CLIENT Setting changed .."
|
||||
anychange=1
|
||||
|
||||
if [ ${choice} = on ]; then
|
||||
if /home/admin/config.scripts/cl-plugin.watchtower-client.sh info; then
|
||||
sudo /home/admin/config.scripts/cl-plugin.watchtower-client.sh on
|
||||
else
|
||||
echo "CL WATCHTOWER CLIENT install was cancelled."
|
||||
sleep 2
|
||||
fi
|
||||
else
|
||||
sudo /home/admin/config.scripts/cl-plugin.watchtower-client.sh off
|
||||
fi
|
||||
needsReboot=0
|
||||
else
|
||||
echo "CL WATCHTOWER CLIENT Setting unchanged."
|
||||
fi
|
||||
|
||||
# parallel testnet process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "p")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
# get raspiblitz config
|
||||
echo "get raspiblitz config"
|
||||
source /home/admin/raspiblitz.info
|
||||
@ -15,6 +15,7 @@ if [ ${#BTCPayServer} -eq 0 ]; then BTCPayServer="off"; fi
|
||||
if [ ${#ElectRS} -eq 0 ]; then ElectRS="off"; fi
|
||||
if [ ${#lndmanage} -eq 0 ]; then lndmanage="off"; fi
|
||||
if [ ${#joinmarket} -eq 0 ]; then joinmarket="off"; fi
|
||||
if [ ${#jam} -eq 0 ]; then jam="off"; fi
|
||||
if [ ${#LNBits} -eq 0 ]; then LNBits="off"; fi
|
||||
if [ ${#mempoolExplorer} -eq 0 ]; then mempoolExplorer="off"; fi
|
||||
if [ ${#bos} -eq 0 ]; then bos="off"; fi
|
||||
@ -22,16 +23,14 @@ if [ ${#pyblock} -eq 0 ]; then pyblock="off"; fi
|
||||
if [ ${#thunderhub} -eq 0 ]; then thunderhub="off"; fi
|
||||
if [ ${#sphinxrelay} -eq 0 ]; then sphinxrelay="off"; fi
|
||||
if [ ${#lit} -eq 0 ]; then lit="off"; fi
|
||||
if [ ${#lndg} -eq 0 ]; then lndg="off"; fi
|
||||
if [ ${#whitepaper} -eq 0 ]; then whitepaper="off"; fi
|
||||
if [ ${#chantools} -eq 0 ]; then chantools="off"; fi
|
||||
if [ ${#homer} -eq 0 ]; then homer="off"; fi
|
||||
if [ ${#sparko} -eq 0 ]; then sparko="off"; fi
|
||||
if [ ${#spark} -eq 0 ]; then spark="off"; fi
|
||||
if [ ${#tallycoinConnect} -eq 0 ]; then tallycoinConnect="off"; fi
|
||||
if [ ${#helipad} -eq 0 ]; then helipad="off"; fi
|
||||
if [ ${#bitcoinminds} -eq 0 ]; then bitcoinminds="off"; fi
|
||||
if [ ${#squeaknode} -eq 0 ]; then squeaknode="off"; fi
|
||||
if [ ${#itchysats} -eq 0 ]; then itchysats="off"; fi
|
||||
if [ ${#lightningtipbot} -eq 0 ]; then lightningtipbot="off"; fi
|
||||
if [ ${#fints} -eq 0 ]; then fints="off"; fi
|
||||
if [ ${#lndk} -eq 0 ]; then lndk="off"; fi
|
||||
if [ ${#labelbase} -eq 0 ]; then labelbase="off"; fi
|
||||
|
||||
# show select dialog
|
||||
echo "run dialog ..."
|
||||
@ -40,44 +39,42 @@ OPTIONS=()
|
||||
|
||||
# just available for BTC
|
||||
if [ "${network}" == "bitcoin" ]; then
|
||||
OPTIONS+=(e 'BTC Electrum Rust Server' ${ElectRS})
|
||||
OPTIONS+=(p 'BTC PayServer' ${BTCPayServer})
|
||||
OPTIONS+=(b 'BTC RPC-Explorer' ${BTCRPCexplorer})
|
||||
OPTIONS+=(s 'BTC Specter Desktop' ${specter})
|
||||
OPTIONS+=(a 'BTC Mempool Space' ${mempoolExplorer})
|
||||
OPTIONS+=(j 'BTC JoinMarket+JoininBox menu' ${joinmarket})
|
||||
OPTIONS+=(w 'BTC Download Bitcoin Whitepaper' ${whitepaper})
|
||||
OPTIONS+=(v 'BTC Install BitcoinMinds.org' ${bitcoinminds})
|
||||
OPTIONS+=(u 'BTC Install ItchySats' ${itchysats})
|
||||
OPTIONS+=(ea 'BTC Electrum Rust Server' ${ElectRS})
|
||||
OPTIONS+=(pa 'BTC PayServer' ${BTCPayServer})
|
||||
OPTIONS+=(ba 'BTC RPC-Explorer' ${BTCRPCexplorer})
|
||||
OPTIONS+=(sa 'BTC Specter Desktop' ${specter})
|
||||
OPTIONS+=(aa 'BTC Mempool Space' ${mempoolExplorer})
|
||||
OPTIONS+=(ja 'BTC JoinMarket+JoininBox menu' ${joinmarket})
|
||||
OPTIONS+=(za 'BTC Jam (JoinMarket WebUI)' ${jam})
|
||||
OPTIONS+=(wa 'BTC Download Bitcoin Whitepaper' ${whitepaper})
|
||||
OPTIONS+=(ls 'BTC Labelbase' ${labelbase})
|
||||
fi
|
||||
|
||||
# available for both LND & c-lightning
|
||||
if [ "${lnd}" == "on" ] || [ "${cl}" == "on" ]; then
|
||||
OPTIONS+=(i 'LNbits (Lightning Accounts)' ${LNBits})
|
||||
OPTIONS+=(ia 'LNbits (Lightning Accounts)' ${LNBits})
|
||||
OPTIONS+=(ga 'LightningTipBot' ${lightningtipbot})
|
||||
fi
|
||||
|
||||
# just available for LND
|
||||
if [ "${lightning}" == "lnd" ] || [ "${lnd}" == "on" ]; then
|
||||
OPTIONS+=(r 'LND RTL Webinterface' ${rtlWebinterface})
|
||||
OPTIONS+=(t 'LND ThunderHub' ${thunderhub})
|
||||
OPTIONS+=(l 'LND LIT (loop, pool, faraday)' ${lit})
|
||||
OPTIONS+=(o 'LND Balance of Satoshis' ${bos})
|
||||
OPTIONS+=(y 'LND PyBLOCK' ${pyblock})
|
||||
OPTIONS+=(h 'LND ChannelTools (Fund Rescue)' ${chantools})
|
||||
OPTIONS+=(x 'LND Sphinx-Relay' ${sphinxrelay})
|
||||
OPTIONS+=(f 'LND Helipad Boostagram reader' ${helipad})
|
||||
OPTIONS+=(d 'LND Tallycoin Connect' ${tallycoinConnect})
|
||||
#OPTIONS+=(q 'LND Squeaknode' ${squeaknode})
|
||||
OPTIONS+=(ra 'LND RTL Webinterface' ${rtlWebinterface})
|
||||
OPTIONS+=(ta 'LND ThunderHub' ${thunderhub})
|
||||
OPTIONS+=(la 'LND LIT (loop, pool, faraday)' ${lit})
|
||||
OPTIONS+=(gb 'LND LNDg (auto-rebalance, auto-fees)' ${lndg})
|
||||
OPTIONS+=(oa 'LND Balance of Satoshis' ${bos})
|
||||
OPTIONS+=(ya 'LND PyBLOCK' ${pyblock})
|
||||
OPTIONS+=(ha 'LND ChannelTools (Fund Rescue)' ${chantools})
|
||||
OPTIONS+=(fa 'LND Helipad Boostagram reader' ${helipad})
|
||||
OPTIONS+=(lb 'LND LNDK (experimental BOLT 12)' ${lndk})
|
||||
fi
|
||||
|
||||
# just available for CL
|
||||
if [ "${lightning}" == "cl" ] || [ "${cl}" == "on" ]; then
|
||||
OPTIONS+=(c 'Core Lightning RTL Webinterface' ${crtlWebinterface})
|
||||
OPTIONS+=(k 'Core Lightning Sparko WebWallet' ${sparko})
|
||||
OPTIONS+=(n 'Core Lightning Spark Wallet' ${spark})
|
||||
OPTIONS+=(ca 'Core Lightning RTL Webinterface' ${crtlWebinterface})
|
||||
fi
|
||||
|
||||
OPTIONS+=(m 'Homer Dashboard' ${homer})
|
||||
OPTIONS+=(fn 'FinTS/HBCI Interface (experimental)' ${fints})
|
||||
|
||||
CHOICES=$(dialog --title ' Additional Mainnet Services ' \
|
||||
--checklist ' use spacebar to activate/de-activate ' \
|
||||
@ -101,7 +98,7 @@ needsReboot=0
|
||||
anychange=0
|
||||
|
||||
# RTL process choice (LND)
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "r")
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "ra")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
|
||||
if [ "${rtlWebinterface}" != "${choice}" ]; then
|
||||
@ -127,7 +124,7 @@ else
|
||||
fi
|
||||
|
||||
# RTL process choice (Core Lightning)
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "c")
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "ca")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${crtlWebinterface}" != "${choice}" ]; then
|
||||
echo "RTL-cl Webinterface Setting changed .."
|
||||
@ -152,7 +149,7 @@ else
|
||||
fi
|
||||
|
||||
# BTC-RPC-Explorer process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "b")
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "ba")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${BTCRPCexplorer}" != "${choice}" ]; then
|
||||
echo "RTL Webinterface Setting changed .."
|
||||
@ -180,7 +177,7 @@ else
|
||||
fi
|
||||
|
||||
# Specter Desktop process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "s")
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "sa")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${specter}" != "${choice}" ]; then
|
||||
echo "Specter Desktop Setting changed .."
|
||||
@ -203,7 +200,7 @@ else
|
||||
fi
|
||||
|
||||
# ElectRS process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "e")
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "ea")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${ElectRS}" != "${choice}" ]; then
|
||||
echo "ElectRS Setting changed .."
|
||||
@ -253,7 +250,7 @@ else
|
||||
fi
|
||||
|
||||
# BTCPayServer process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "p")
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "pa")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${BTCPayServer}" != "${choice}" ]; then
|
||||
echo "BTCPayServer setting changed .."
|
||||
@ -289,7 +286,7 @@ else
|
||||
fi
|
||||
|
||||
# LNDMANAGE process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "ä")
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "ab")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${lndmanage}" != "${choice}" ]; then
|
||||
echo "lndmanage Setting changed .."
|
||||
@ -304,7 +301,7 @@ else
|
||||
fi
|
||||
|
||||
# CHANTOOLS process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "h")
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "ha")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${chantools}" != "${choice}" ]; then
|
||||
echo "chantools Setting changed .."
|
||||
@ -319,7 +316,7 @@ else
|
||||
fi
|
||||
|
||||
# Balance of Satoshis process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "o")
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "oa")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${bos}" != "${choice}" ]; then
|
||||
echo "Balance of Satoshis Setting changed .."
|
||||
@ -334,7 +331,7 @@ else
|
||||
fi
|
||||
|
||||
# PyBLOCK process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "y")
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "ya")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${pyblock}" != "${choice}" ]; then
|
||||
echo "PyBLOCK Setting changed .."
|
||||
@ -349,7 +346,7 @@ else
|
||||
fi
|
||||
|
||||
# thunderhub process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "t")
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "ta")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${thunderhub}" != "${choice}" ]; then
|
||||
echo "ThunderHub Setting changed .."
|
||||
@ -374,7 +371,7 @@ else
|
||||
fi
|
||||
|
||||
# LNbits process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "i")
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "ia")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${LNBits}" != "${choice}" ]; then
|
||||
echo "LNbits Setting changed .."
|
||||
@ -388,8 +385,23 @@ else
|
||||
echo "LNbits setting unchanged."
|
||||
fi
|
||||
|
||||
# LightningTipBot process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "ga")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${lightningtipbot}" != "${choice}" ]; then
|
||||
echo "LightningTipBot Setting changed .."
|
||||
anychange=1
|
||||
sudo -u admin /home/admin/config.scripts/bonus.lightningtipbot.sh ${choice}
|
||||
if [ "${choice}" = "on" ]; then
|
||||
sudo systemctl start lightningtipbot
|
||||
sudo -u admin /home/admin/config.scripts/bonus.lightningtipbot.sh menu
|
||||
fi
|
||||
else
|
||||
echo "LightningTipBot setting unchanged."
|
||||
fi
|
||||
|
||||
# LIT (Lightning Terminal)
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "l")
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "la")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${lit}" != "${choice}" ]; then
|
||||
echo "LIT Setting changed .."
|
||||
@ -403,27 +415,43 @@ else
|
||||
echo "LIT setting unchanged."
|
||||
fi
|
||||
|
||||
# Sphinx Relay
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "x")
|
||||
# LNDg
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "gb")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${sphinxrelay}" != "${choice}" ]; then
|
||||
echo "Sphinx-Relay Setting changed .."
|
||||
if [ "${lndg}" != "${choice}" ]; then
|
||||
echo "LNDg Setting changed .."
|
||||
anychange=1
|
||||
sudo -u admin /home/admin/config.scripts/bonus.sphinxrelay.sh ${choice}
|
||||
databasechoice=""
|
||||
isDatabase=$(sudo ls /mnt/hdd/app-data/lndg/data/db.sqlite3 2>/dev/null | grep -c 'db.sqlite3')
|
||||
if ! [ ${isDatabase} -eq 0 ]; then
|
||||
if [ "${choice}" = "off" ]; then
|
||||
whiptail --title "Delete LNDg Database?" \
|
||||
--yes-button "Keep Database" \
|
||||
--no-button "Delete Database" \
|
||||
--yesno "LNDg is getting uninstalled. If you keep the database, you will be able to reuse the data should you choose to re-install. Do you wish to keep the database?" 10 80
|
||||
if [ $? -eq 1 ]; then
|
||||
databasechoice="deletedatabase"
|
||||
fi
|
||||
else
|
||||
whiptail --title "Use Existing LNDg Database?" \
|
||||
--yes-button "Use existing database" \
|
||||
--no-button "Start a new database" \
|
||||
--yesno "LNDg is getting installed, and there is an existing database. You may use the existing database, which will include your old password and all of your old data, or you may start with a clean database. Do you wish to use the existing database?" 10 110
|
||||
if [ $? -eq 1 ]; then
|
||||
databasechoice="deletedatabase"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
sudo -u admin /home/admin/config.scripts/bonus.lndg.sh ${choice} ${databasechoice}
|
||||
if [ "${choice}" = "on" ]; then
|
||||
echo "Giving service 1 minute to start up ... (please wait) ..."
|
||||
sleep 60
|
||||
whiptail --title " Installed Sphinx Server" --msgbox "\
|
||||
Sphinx Server was installed.\n
|
||||
Use the new 'SPHINX' entry in Main Menu for more info.\n
|
||||
" 10 35
|
||||
sudo -u admin /home/admin/config.scripts/bonus.lndg.sh menu
|
||||
fi
|
||||
else
|
||||
echo "Sphinx Relay unchanged."
|
||||
echo "LNDg unchanged."
|
||||
fi
|
||||
|
||||
# Helipad
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "f")
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "fa")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${helipad}" != "${choice}" ]; then
|
||||
echo "Helipad setting changed .."
|
||||
@ -437,25 +465,24 @@ else
|
||||
echo "Helipad setting unchanged."
|
||||
fi
|
||||
|
||||
# Tallycoin
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "d")
|
||||
# LNDK
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "lb")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${tallycoinConnect}" != "${choice}" ]; then
|
||||
echo "Tallycoin Setting changed .."
|
||||
if [ "${lndk}" != "${choice}" ]; then
|
||||
echo "LNDK Setting changed .."
|
||||
anychange=1
|
||||
sudo -u admin /home/admin/config.scripts/bonus.tallycoin-connect.sh ${choice}
|
||||
sudo -u admin /home/admin/config.scripts/bonus.lndk.sh ${choice}
|
||||
if [ "${choice}" = "on" ]; then
|
||||
whiptail --title " Installed Tallycoin-Connect" --msgbox "\
|
||||
Tallycoin-Connect was installed.\n
|
||||
Use the new 'TALLY' entry in Main Menu for more info.\n
|
||||
whiptail --title " Installed LNDK" --msgbox "\
|
||||
LNDK was installed.\n
|
||||
" 10 45
|
||||
fi
|
||||
else
|
||||
echo "Tallycoin Setting unchanged."
|
||||
echo "LNDK Setting unchanged."
|
||||
fi
|
||||
|
||||
# JoinMarket process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "j")
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "ja")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${joinmarket}" != "${choice}" ]; then
|
||||
echo "JoinMarket setting changed .."
|
||||
@ -483,8 +510,37 @@ else
|
||||
echo "JoinMarket not changed."
|
||||
fi
|
||||
|
||||
# Jam process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "za")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${jam}" != "${choice}" ]; then
|
||||
echo "Jam setting changed .."
|
||||
# check if TOR is installed
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
if [ "${choice}" = "on" ] && [ "${runBehindTor}" = "off" ]; then
|
||||
whiptail --title " Use Tor with Jam" --msgbox "\
|
||||
It is highly recommended to use Tor with Jam.\n
|
||||
Please activate TOR in SERVICES first.\n
|
||||
Then try activating Jam again in SERVICES.\n
|
||||
" 13 42
|
||||
else
|
||||
anychange=1
|
||||
sudo /home/admin/config.scripts/bonus.jam.sh ${choice}
|
||||
errorOnInstall=$?
|
||||
if [ "${choice}" = "on" ]; then
|
||||
if [ ${errorOnInstall} -eq 0 ]; then
|
||||
sudo /home/admin/config.scripts/bonus.jam.sh menu
|
||||
else
|
||||
whiptail --title 'FAIL' --msgbox "Jam installation is cancelled\nTry again from the menu or install from the terminal with:\nsudo /home/admin/config.scripts/bonus.jam.sh on" 9 65
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "Jam not changed."
|
||||
fi
|
||||
|
||||
# Mempool process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "a")
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "aa")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${mempoolExplorer}" != "${choice}" ]; then
|
||||
echo "Mempool Explorer settings changed .."
|
||||
@ -511,7 +567,7 @@ else
|
||||
fi
|
||||
|
||||
# Whitepaper process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "w")
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "wa")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${whitepaper}" != "${choice}" ]; then
|
||||
echo "Whitepaper setting changed .."
|
||||
@ -525,111 +581,30 @@ else
|
||||
echo "Whitepaper setting unchanged."
|
||||
fi
|
||||
|
||||
# Homer process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "m")
|
||||
# labelbase process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "ls")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${homer}" != "${choice}" ]; then
|
||||
echo "Homer settings changed .."
|
||||
if [ "${labelbase}" != "${choice}" ]; then
|
||||
echo "Labelbase setting changed .."
|
||||
anychange=1
|
||||
/home/admin/config.scripts/bonus.homer.sh ${choice}
|
||||
errorOnInstall=$?
|
||||
if [ "${choice}" = "on" ]; then
|
||||
whiptail --title " Installed Homer" --msgbox "\
|
||||
Homer was installed.\n
|
||||
Use the new 'Homer' entry in Main Menu for more info.\n
|
||||
" 10 35
|
||||
fi
|
||||
else
|
||||
echo "Homer Setting unchanged."
|
||||
fi
|
||||
|
||||
# BitcoinMinds process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "v")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${bitcoinminds}" != "${choice}" ]; then
|
||||
echo "BitcoinMinds setting changed."
|
||||
anychange=1
|
||||
sudo -u admin /home/admin/config.scripts/bonus.bitcoinminds.sh ${choice}
|
||||
sudo -u admin /home/admin/config.scripts/bonus.labelbase.sh ${choice}
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
if [ "${bitcoinminds}" = "on" ]; then
|
||||
sudo -u admin /home/admin/config.scripts/bonus.bitcoinminds.sh menu
|
||||
if [ "${labelbase}" = "on" ]; then
|
||||
sudo -u admin /home/admin/config.scripts/bonus.labelbase.sh menu
|
||||
fi
|
||||
else
|
||||
echo "BitcoinMinds setting unchanged."
|
||||
echo "Labelbase setting unchanged."
|
||||
fi
|
||||
|
||||
# sparko process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "k")
|
||||
# fints process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "fn")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${sparko}" != "${choice}" ]; then
|
||||
echo "# Sparko on mainnet Setting changed .."
|
||||
if [ "${fints}" != "${choice}" ]; then
|
||||
echo "fints setting changed .."
|
||||
anychange=1
|
||||
/home/admin/config.scripts/cl-plugin.sparko.sh ${choice} mainnet
|
||||
errorOnInstall=$?
|
||||
if [ "${choice}" = "on" ]; then
|
||||
if [ ${errorOnInstall} -eq 0 ]; then
|
||||
/home/admin/config.scripts/cl-plugin.sparko.sh menu mainnet
|
||||
else
|
||||
l1="# FAIL on Sparko on mainnet install #"
|
||||
l2="# Try manual install on terminal after reboot with:"
|
||||
l3="/home/admin/config.scripts/cl-plugin.sparko.sh on mainnet"
|
||||
dialog --title 'FAIL' --msgbox "${l1}\n${l2}\n${l3}" 7 65
|
||||
fi
|
||||
fi
|
||||
sudo -u admin /home/admin/config.scripts/bonus.fints.sh ${choice}
|
||||
else
|
||||
echo "# Sparko on mainnet Setting unchanged."
|
||||
fi
|
||||
|
||||
# spark wallet process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "n")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${spark}" != "${choice}" ]; then
|
||||
echo "# Spark Wallet on mainnet Setting changed .."
|
||||
anychange=1
|
||||
/home/admin/config.scripts/cl.spark.sh ${choice} mainnet
|
||||
errorOnInstall=$?
|
||||
if [ "${choice}" = "on" ]; then
|
||||
if [ ${errorOnInstall} -eq 0 ]; then
|
||||
/home/admin/config.scripts/cl.spark.sh menu mainnet
|
||||
else
|
||||
l1="# FAIL on Spark Wallet on mainnet install #"
|
||||
l2="# Try manual install on terminal after reboot with:"
|
||||
l3="/home/admin/config.scripts/cl.spark.sh on mainnet"
|
||||
dialog --title 'FAIL' --msgbox "${l1}\n${l2}\n${l3}" 7 65
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "# Spark Wallet on mainnet Setting unchanged."
|
||||
fi
|
||||
|
||||
# squeaknode process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "q")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${squeaknode}" != "${choice}" ]; then
|
||||
echo "squeaknode Setting changed .."
|
||||
anychange=1
|
||||
sudo -u admin /home/admin/config.scripts/bonus.squeaknode.sh ${choice}
|
||||
if [ "${choice}" = "on" ]; then
|
||||
sudo systemctl start squeaknode
|
||||
sudo -u admin /home/admin/config.scripts/bonus.squeaknode.sh menu
|
||||
fi
|
||||
else
|
||||
echo "squeaknode setting unchanged."
|
||||
fi
|
||||
|
||||
# ItchySats process choice
|
||||
choice="off"; check=$(echo "${CHOICES}" | grep -c "u")
|
||||
if [ ${check} -eq 1 ]; then choice="on"; fi
|
||||
if [ "${itchysats}" != "${choice}" ]; then
|
||||
echo "ItchySats setting changed .."
|
||||
anychange=1
|
||||
sudo -u admin /home/admin/config.scripts/bonus.itchysats.sh ${choice} --download
|
||||
if [ "${choice}" = "on" ]; then
|
||||
sudo systemctl start itchysats
|
||||
sudo -u admin /home/admin/config.scripts/bonus.itchysats.sh menu
|
||||
fi
|
||||
else
|
||||
echo "ItchySats setting unchanged."
|
||||
echo "fints setting unchanged."
|
||||
fi
|
||||
|
||||
if [ ${anychange} -eq 0 ]; then
|
||||
|
@ -73,7 +73,7 @@ if [ "${lightning}" == "lnd" ] || [ "${lnd}" == "on" ]; then
|
||||
OPTIONS+=(ZEUS_IOS "Zeus to LND (iOS)")
|
||||
OPTIONS+=(ZEUS_ANDROID "Zeus to LND (Android)")
|
||||
OPTIONS+=(ZAP_IOS "Zap to LND (iOS)")
|
||||
OPTIONS+=(ZAP_ANDROID "Zap to LND (Android)")
|
||||
OPTIONS+=(ZAP_ANDROID "Zap/Bitbanana to LND (Android)")
|
||||
OPTIONS+=(SPHINX "Sphinx Chat to LND (Android/iOS)")
|
||||
OPTIONS+=(SENDMANY_ANDROID "SendMany to LND (Android)")
|
||||
OPTIONS+=(FULLYNODED_LND "Fully Noded to LND REST (iOS+Tor)")
|
||||
@ -81,8 +81,6 @@ fi
|
||||
|
||||
if [ "${lightning}" == "cl" ] || [ "${cl}" == "on" ]; then
|
||||
OPTIONS+=(ZEUS_CLREST "Zeus to Core LightningREST (Android or iOS)")
|
||||
OPTIONS+=(ZEUS_SPARK "Zeus to Sparko (Android or iOS)")
|
||||
OPTIONS+=(SPARK "Spark Wallet to Sparko (Android - EXPERIMENTAL)" )
|
||||
OPTIONS+=(FULLYNODED_CL "Fully Noded to CL REST (iOS+Tor)")
|
||||
fi
|
||||
|
||||
@ -139,33 +137,22 @@ Or scan the qr code on the LCD with your mobile phone.
|
||||
exit 0;
|
||||
;;
|
||||
ZAP_ANDROID)
|
||||
appstoreLink="https://play.google.com/store/apps/details?id=zapsolutions.zap"
|
||||
sudo /home/admin/config.scripts/blitz.display.sh image /home/admin/raspiblitz/pictures/app_zap.png
|
||||
whiptail --title "Install Zap on your Android Phone" \
|
||||
whiptail --title "Install Zap/Bitbanana on your Android Phone" \
|
||||
--yes-button "Continue" \
|
||||
--no-button "StoreLink" \
|
||||
--yesno "Open the Android Play Store on your mobile phone.\n\nSearch for --> 'zap bitcoin app'\n\nCheck that logo is like on LCD and author is: Zap\nWhen app is installed and started --> Continue." 12 65
|
||||
if [ $? -eq 1 ]; then
|
||||
sudo /home/admin/config.scripts/blitz.display.sh qr ${appstoreLink}
|
||||
whiptail --title " App Store Link " --msgbox "\
|
||||
To install app open the following link:\n
|
||||
${appstoreLink}\n
|
||||
Or scan the qr code on the LCD with your mobile phone.
|
||||
" 11 70
|
||||
fi
|
||||
sudo /home/admin/config.scripts/blitz.display.sh hide
|
||||
--yesno "Open the Android Play Store on your mobile phone.\n\nSearch for --> 'bitbanana' (for updated fork)\nSearch for --> 'zap bitcoin app' (for original)\n\nWhen app is installed and started --> Continue." 12 65
|
||||
/home/admin/config.scripts/bonus.lndconnect.sh zap-android tor
|
||||
exit 0;
|
||||
;;
|
||||
SENDMANY_ANDROID)
|
||||
|
||||
# check if keysend is activated first
|
||||
source <(/home/admin/config.scripts/lnd.keysend.sh status)
|
||||
keysendOn=$(cat /mnt/hdd/lnd/lnd.conf | grep -c '^accept-keysend=1')
|
||||
if [ "${keysendOn}" == "0" ]; then
|
||||
whiptail --title " KEYSEND NEEDED " --msgbox "
|
||||
whiptail --title " LND KEYSEND NEEDED " --msgbox "
|
||||
To use the chat feature of the SendMany app, you need to activate the Keysend feature first.
|
||||
|
||||
Please go to MAINMENU > SERVICES and activate KEYSEND first.
|
||||
Please go to MAINMENU > SYSTEM > LNDCONF and set accept-keysend=1 first.
|
||||
" 12 65
|
||||
exit 0
|
||||
fi
|
||||
@ -294,37 +281,4 @@ ZEUS_CLREST)
|
||||
/home/admin/config.scripts/cl.rest.sh connect
|
||||
exit 0;
|
||||
;;
|
||||
ZEUS_SPARK)
|
||||
sudo /home/admin/config.scripts/blitz.display.sh image /home/admin/raspiblitz/pictures/app_zeus.png
|
||||
whiptail --title "Install Zeus on your Android or iOS Phone" \
|
||||
--yes-button "Continue" \
|
||||
--no-button "Cancel" \
|
||||
--yesno "Open the https://zeusln.app/ on your mobile phone to find the App Store link or binary for your phone.\n\nWhen the app is installed and started --> Continue." 12 65
|
||||
if [ $? -eq 1 ]; then
|
||||
exit 0
|
||||
fi
|
||||
sudo /home/admin/config.scripts/blitz.display.sh hide
|
||||
/home/admin/config.scripts/cl-plugin.sparko.sh connect
|
||||
exit 0;
|
||||
;;
|
||||
SPARK)
|
||||
appstoreLink="https://github.com/shesek/spark-wallet#mobile-app"
|
||||
sudo /home/admin/config.scripts/blitz.display.sh image /home/admin/raspiblitz/pictures/app_zeus.png
|
||||
whiptail --title "Install Zeus on your Android Phone" \
|
||||
--yes-button "Continue" \
|
||||
--no-button "GitHub link" \
|
||||
--yesno "Open the ${appstoreLink} on Android to find the App Store link or binary for your phone.\n\nWhen the app is installed and started --> Continue." 12 65
|
||||
if [ $? -eq 1 ]; then
|
||||
sudo /home/admin/config.scripts/blitz.display.sh qr ${appstoreLink}
|
||||
whiptail --title " GitHub link " --msgbox "\
|
||||
To install app open the following link:\n
|
||||
${appstoreLink}\n
|
||||
Or scan the QR code on the LCD with your mobile phone.
|
||||
" 11 70
|
||||
fi
|
||||
sudo /home/admin/config.scripts/blitz.display.sh hide
|
||||
/home/admin/config.scripts/cl-plugin.sparko.sh connect
|
||||
exit 0;
|
||||
;;
|
||||
|
||||
esac
|
||||
|
@ -29,10 +29,6 @@ elif [ "${CHOICE}" = "RESYNC" ]; then
|
||||
echo "rebooting .. (please wait)"
|
||||
sudo /home/admin/config.scripts/blitz.shutdown.sh reboot
|
||||
|
||||
elif [ "${CHOICE}" = "REINDEX" ]; then
|
||||
echo "Starting REINDEX ..."
|
||||
sudo /home/admin/config.scripts/network.reindex.sh
|
||||
|
||||
elif [ "${CHOICE}" = "BACKUP" ]; then
|
||||
/home/admin/config.scripts/lnd.compact.sh interactive
|
||||
sudo /home/admin/config.scripts/lnd.backup.sh lnd-export-gui
|
||||
|
@ -65,6 +65,9 @@ RaspiBlitz image to your SD card.
|
||||
" 12 40
|
||||
}
|
||||
|
||||
# get status of txindex
|
||||
source <(sudo /home/admin/config.scripts/network.txindex.sh status)
|
||||
|
||||
OPTIONS=()
|
||||
#OPTIONS+=(HARDWARE "Run Hardwaretest")
|
||||
OPTIONS+=(SOFTWARE "Run Softwaretest (DebugReport)")
|
||||
@ -76,11 +79,17 @@ if [ "${lightning}" == "cl" ] || [ "${cl}" == "on" ]; then
|
||||
fi
|
||||
OPTIONS+=(MIGRATION "Migrate Blitz Data to new Hardware")
|
||||
OPTIONS+=(COPY-SOURCE "Copy Blockchain Source Modus")
|
||||
if [ "${txindex}" == "1" ]; then
|
||||
OPTIONS+=(DELETE-INDEX "Reindex Bitcoin Transaction-Index")
|
||||
elif [ "${indexByteSize}" != "0" ]; then
|
||||
OPTIONS+=(DELETE-INDEX "Delete Bitcoin Transaction-Index")
|
||||
fi
|
||||
OPTIONS+=(REINDEX-UTXO "Redindex Just Bitcoin Chainstate (Fast)")
|
||||
OPTIONS+=(REINDEX-FULL "Redindex Full Bitcoin Blockchain (Slow)")
|
||||
OPTIONS+=(RESET-CHAIN "Delete Blockchain & Re-Download")
|
||||
OPTIONS+=(RESET-HDD "Delete HDD Data but keep Blockchain")
|
||||
OPTIONS+=(RESET-ALL "Delete HDD completely to start fresh")
|
||||
OPTIONS+=(DELETE-ELEC "Delete Electrum Index")
|
||||
OPTIONS+=(DELETE-INDEX "Delete Bitcoin Transaction-Index")
|
||||
|
||||
CHOICE=$(whiptail --clear --title "Repair Options" --menu "" 19 62 12 "${OPTIONS[@]}" 2>&1 >/dev/tty)
|
||||
|
||||
@ -89,7 +98,15 @@ case $CHOICE in
|
||||
# HARDWARE)
|
||||
# ;;
|
||||
SOFTWARE)
|
||||
sudo /home/admin/config.scripts/blitz.debug.sh
|
||||
echo "Generating debug logs. Be patient, this should take maximum 2 minutes .."
|
||||
sudo rm /var/cache/raspiblitz/debug.log 2>/dev/null
|
||||
/home/admin/config.scripts/blitz.debug.sh > /var/cache/raspiblitz/debug.log
|
||||
echo "Redacting .."
|
||||
/home/admin/config.scripts/blitz.debug.sh redact /var/cache/raspiblitz/debug.log
|
||||
sudo chmod 640 /var/cache/raspiblitz/debug.log
|
||||
sudo chown root:sudo /var/cache/raspiblitz/debug.log
|
||||
cat /var/cache/raspiblitz/debug.log
|
||||
echo
|
||||
echo "Press ENTER to return to main menu."
|
||||
read key
|
||||
;;
|
||||
@ -148,6 +165,14 @@ case $CHOICE in
|
||||
/home/admin/config.scripts/network.txindex.sh delete
|
||||
exit 0;
|
||||
;;
|
||||
REINDEX-UTXO)
|
||||
/home/admin/config.scripts/network.reindex.sh reindex-chainstate mainnet
|
||||
exit 0;
|
||||
;;
|
||||
REINDEX-FULL)
|
||||
/home/admin/config.scripts/network.reindex.sh reindex mainnet
|
||||
exit 0;
|
||||
;;
|
||||
COPY-SOURCE)
|
||||
/home/admin/config.scripts/blitz.copychain.sh source
|
||||
/home/admin/config.scripts/lnd.unlock.sh
|
||||
|
@ -33,10 +33,13 @@ if [ ${#openChannels} -gt 0 ] && [ ${openChannels} -gt 0 ]; then
|
||||
fi
|
||||
OPTIONS+=(CASHOUT "Withdraw all funds onchain ($CHAIN)")
|
||||
OPTIONS+=(SEED "Show Wallet Seed Words")
|
||||
if [ "${clWatchtowerClient}" == "on" ] && [ "${CHAIN}" == "mainnet" ]; then
|
||||
OPTIONS+=(WATCHTOWER "Watchtower Client Options")
|
||||
fi
|
||||
OPTIONS+=(REPAIR-CL "Repair options for Core Lightning")
|
||||
if [ "${lightning}" != "cl" ] && [ "${CHAIN}" == "mainnet" ]; then
|
||||
OPTIONS+=(SWITCHLN "Use Core Lightning as default")
|
||||
fi
|
||||
fi
|
||||
|
||||
CHOICE_HEIGHT=$(("${#OPTIONS[@]}/2+1"))
|
||||
HEIGHT=$((CHOICE_HEIGHT+6))
|
||||
@ -53,7 +56,7 @@ CHOICE=$(dialog --clear \
|
||||
case $CHOICE in
|
||||
SUMMARY)
|
||||
clear
|
||||
/home/admin/config.scripts/cl-plugin.summary.sh $CHAIN
|
||||
/home/admin/config.scripts/cl-plugin.summars.sh $CHAIN
|
||||
echo "Press ENTER to return to main menu."
|
||||
read key
|
||||
;;
|
||||
@ -81,17 +84,17 @@ case $CHOICE in
|
||||
NAME)
|
||||
sudo /home/admin/config.scripts/cl.setname.sh $CHAIN
|
||||
;;
|
||||
WATCHTOWER)
|
||||
/home/admin/config.scripts/cl-plugin.watchtower-client.sh info
|
||||
;;
|
||||
SUEZ)
|
||||
clear
|
||||
if [ ! -f /home/bitcoin/suez/suez ];then
|
||||
/home/admin/config.scripts/bonus.suez.sh on
|
||||
fi
|
||||
cd /home/bitcoin/suez || exit 0
|
||||
command="sudo -u bitcoin /home/bitcoin/.local/bin/poetry run ./suez --client=c-lightning --client-args=--conf=${CLCONF}"
|
||||
echo "# Running the command:"
|
||||
echo "${command}"
|
||||
cd /home/bitcoin/suez || exit 1
|
||||
echo
|
||||
$command
|
||||
sudo -u bitcoin poetry run /home/bitcoin/suez/suez --client=c-lightning --client-args=--conf=${CLCONF}
|
||||
echo
|
||||
echo "Press ENTER to return to main menu."
|
||||
read key
|
||||
@ -105,7 +108,7 @@ case $CHOICE in
|
||||
/home/admin/99clRepairMenu.sh $CHAIN
|
||||
;;
|
||||
SWITCHLN)
|
||||
clear
|
||||
clear
|
||||
echo
|
||||
# setting value in the raspiblitz.conf
|
||||
/home/admin/config.scripts/blitz.conf.sh set lightning "cl"
|
||||
@ -117,4 +120,4 @@ case $CHOICE in
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
exit 0
|
||||
|
@ -16,7 +16,7 @@ function clRescan() {
|
||||
dialog --backtitle "Choose the new gap limit" \
|
||||
--title "Enter the rescan depth or blockheight (-)" \
|
||||
--inputbox "
|
||||
Enter the number of blocks to rescan from the current tip
|
||||
Enter the number of blocks to rescan from the current tip
|
||||
or use a negative number for the absolute blockheight to scan from.
|
||||
|
||||
If left empty will start to rescan from the block 700000 (-700000).
|
||||
@ -29,6 +29,13 @@ If left empty will start to rescan from the block 700000 (-700000).
|
||||
sudo systemctl restart ${netprefix}lightningd
|
||||
}
|
||||
|
||||
function resetWallet() {
|
||||
echo "# Delete ${CLCONF}"
|
||||
sudo rm -f ${CLCONF}
|
||||
echo "# Delete and recreate /home/bitcoin/.lightning/${CLNETWORK}"
|
||||
sudo rm -rf /home/bitcoin/.lightning/${CLNETWORK}
|
||||
sudo -u bitcoin mkdir /home/bitcoin/.lightning/${CLNETWORK}
|
||||
}
|
||||
|
||||
# BASIC MENU INFO
|
||||
WIDTH=64
|
||||
@ -76,31 +83,33 @@ case $CHOICE in
|
||||
/home/admin/config.scripts/cl.hsmtool.sh decrypt $CHAIN
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
;;
|
||||
|
||||
|
||||
PASSWORD_C)
|
||||
/home/admin/config.scripts/cl.hsmtool.sh change-password $CHAIN
|
||||
;;
|
||||
|
||||
|
||||
AUTOUNLOCK-ON)
|
||||
/home/admin/config.scripts/cl.hsmtool.sh autounlock-on $CHAIN
|
||||
;;
|
||||
|
||||
|
||||
AUTOUNLOCK-OFF)
|
||||
/home/admin/config.scripts/cl.hsmtool.sh autounlock-off $CHAIN
|
||||
;;
|
||||
|
||||
|
||||
BACKUP)
|
||||
if [ "${cl}" == "on" ] || [ "${cl}" == "1" ] && [ "${clEncryptedHSM}" != "on" ]; then
|
||||
dialog \
|
||||
--title "Encrypt the Core Lightning wallet" \
|
||||
--msgbox "\nWill proceed to encrypt and lock the Core Lightning wallet to prevent it from starting automatically after the backup" 9 55
|
||||
--msgbox "
|
||||
Will proceed to encrypt and lock the Core Lightning wallet to prevent it from starting automatically after the backup.
|
||||
Save this password as it will be needed to restore the backup (same as the Password C for CLN)." 10 55
|
||||
sudo /home/admin/config.scripts/cl.hsmtool.sh encrypt mainnet
|
||||
fi
|
||||
if [ "${clAutoUnlock}" = "on" ]; then
|
||||
/home/admin/config.scripts/cl.hsmtool.sh autounlock-off mainnet
|
||||
fi
|
||||
/home/admin/config.scripts/cl.hsmtool.sh lock mainnet
|
||||
## from dialogLightningWallet.sh
|
||||
## from dialogLightningWallet.sh
|
||||
_temp="/var/cache/raspiblitz/temp/.temp.tmp"
|
||||
clear
|
||||
/home/admin/config.scripts/cl.backup.sh cl-export-gui production $_temp
|
||||
@ -110,10 +119,10 @@ case $CHOICE in
|
||||
echo "Press ENTER when finished downloading."
|
||||
read key
|
||||
;;
|
||||
|
||||
|
||||
RESET)
|
||||
# backup
|
||||
## from dialogLightningWallet.sh
|
||||
## from dialogLightningWallet.sh
|
||||
_temp="/var/cache/raspiblitz/temp/.temp.tmp"
|
||||
clear
|
||||
/home/admin/config.scripts/cl.backup.sh cl-export-gui production $_temp
|
||||
@ -122,15 +131,12 @@ case $CHOICE in
|
||||
echo
|
||||
echo "The rescue file is stored on the SDcard named cl-rescue.*.tar.gz just in case."
|
||||
echo
|
||||
echo "The next step will overwrite the old C-lighthning $CHAIN wallet"
|
||||
echo "The next step will overwrite the old Core Lightning $CHAIN wallet"
|
||||
echo "Press ENTER to continue or CTRL+C to abort"
|
||||
read key
|
||||
# reset
|
||||
echo "# Delete ${CLCONF}"
|
||||
sudo rm -f ${CLCONF}
|
||||
echo "# Delete and recreate /home/bitcoin/.lightning/${CLNETWORK}"
|
||||
sudo rm -rf /home/bitcoin/.lightning/${CLNETWORK}
|
||||
sudo -u bitcoin mkdir /home/bitcoin/.lightning/${CLNETWORK}
|
||||
|
||||
resetWallet
|
||||
|
||||
# make sure the new hsm_secret is treated as unencrypted and clear autounlock
|
||||
/home/admin/config.scripts/blitz.conf.sh set ${netprefix}clEncryptedHSM "off"
|
||||
/home/admin/config.scripts/blitz.conf.sh set ${netprefix}clAutoUnlock "off"
|
||||
@ -149,10 +155,10 @@ case $CHOICE in
|
||||
/home/admin/config.scripts/cl.install-service.sh signet
|
||||
fi
|
||||
;;
|
||||
|
||||
|
||||
FILERESTORE)
|
||||
# backup
|
||||
## from dialogLightningWallet.sh
|
||||
## from dialogLightningWallet.sh
|
||||
_temp="/var/cache/raspiblitz/temp/.temp.tmp"
|
||||
clear
|
||||
/home/admin/config.scripts/cl.backup.sh cl-export-gui production $_temp
|
||||
@ -161,12 +167,12 @@ case $CHOICE in
|
||||
echo
|
||||
echo "The rescue file is stored on the SDcard named cl-rescue.*.tar.gz just in case."
|
||||
echo
|
||||
echo "The next step will overwrite the old C-lighthning $CHAIN wallet"
|
||||
echo "The next step will overwrite the old Core Lightning $CHAIN wallet"
|
||||
echo "Press ENTER to continue or CTRL+C to abort"
|
||||
read key
|
||||
# reset
|
||||
sudo rm /home/bitcoin/.lightning/${CLNETWORK}/hsm_secret
|
||||
sudo rm -rf /home/bitcoin/.lightning/${CLNETWORK}/*.*
|
||||
|
||||
resetWallet
|
||||
|
||||
# import file
|
||||
_temp="/var/cache/raspiblitz/temp/.temp.tmp"
|
||||
clear
|
||||
@ -174,10 +180,10 @@ case $CHOICE in
|
||||
source $_temp 2>/dev/null
|
||||
sudo rm $_temp 2>/dev/null
|
||||
;;
|
||||
|
||||
|
||||
SEEDRESTORE)
|
||||
# backup
|
||||
## from dialogLightningWallet.sh
|
||||
## from dialogLightningWallet.sh
|
||||
_temp="/var/cache/raspiblitz/temp/.temp.tmp"
|
||||
clear
|
||||
/home/admin/config.scripts/cl.backup.sh cl-export-gui production $_temp
|
||||
@ -186,20 +192,19 @@ case $CHOICE in
|
||||
echo
|
||||
echo "The rescue file is stored on the SDcard named cl-rescue.*.tar.gz just in case."
|
||||
echo
|
||||
echo "The next step will overwrite the old C-lighthning $CHAIN wallet"
|
||||
echo "The next step will overwrite the old Core Lightning $CHAIN wallet"
|
||||
echo "Press ENTER to continue or CTRL+C to abort"
|
||||
read key
|
||||
# reset
|
||||
sudo rm /home/bitcoin/.lightning/${CLNETWORK}/hsm_secret
|
||||
sudo rm -f /home/bitcoin/.lightning/${CLNETWORK}/config
|
||||
sudo rm -rf /home/bitcoin/.lightning/${CLNETWORK}/*.*
|
||||
|
||||
resetWallet
|
||||
|
||||
# import seed
|
||||
_temp="/var/cache/raspiblitz/.temp.tmp"
|
||||
/home/admin/config.scripts/cl.backup.sh seed-import-gui $_temp
|
||||
source $_temp
|
||||
/home/admin/config.scripts/cl.hsmtool.sh seed-force "$CHAIN" "${seedWords}"
|
||||
sudo rm $_temp 2>/dev/null
|
||||
if ! sudo ls /home/bitcoin/.lightning/${CLNETWORK}/hsm_secret; then
|
||||
if ! sudo ls /home/bitcoin/.lightning/${CLNETWORK}/hsm_secret 2>/dev/null; then
|
||||
echo "# There was no hsm_secret created - exiting"
|
||||
exit 15
|
||||
fi
|
||||
|
@ -34,6 +34,9 @@ if [ "${lightning}" == "lnd" ] || [ "${lnd}" == "on" ]; then
|
||||
OPTIONS+=(RESET "Recreate LND Macaroons & tls.cert")
|
||||
OPTIONS+=(SYNC "Sync Macaroons & tls.cert with Apps/Users")
|
||||
fi
|
||||
if [ -f /mnt/hdd/app-data/selfsignedcert/selfsigned.cert ]; then
|
||||
OPTIONS+=(RESET-TLS "Reset the self-signed TLS certificate")
|
||||
fi
|
||||
|
||||
CHOICE_HEIGHT=$(("${#OPTIONS[@]}/2+1"))
|
||||
HEIGHT=$((CHOICE_HEIGHT+6))
|
||||
@ -65,7 +68,6 @@ case $CHOICE in
|
||||
exit 0;;
|
||||
RESET)
|
||||
sudo /home/admin/config.scripts/lnd.credentials.sh reset "${chain:-main}net"
|
||||
sudo /home/admin/config.scripts/lnd.credentials.sh sync "${chain:-main}net"
|
||||
sudo /home/admin/config.scripts/blitz.shutdown.sh reboot
|
||||
exit 0;;
|
||||
SYNC)
|
||||
@ -76,7 +78,9 @@ case $CHOICE in
|
||||
EXPORT)
|
||||
sudo /home/admin/config.scripts/lnd.export.sh
|
||||
exit 0;;
|
||||
|
||||
RESET-TLS)
|
||||
sudo /home/admin/config.scripts/internetselfsignedcert.sh reset
|
||||
exit 0;;
|
||||
ALBY)
|
||||
/home/admin/config.scripts/bonus.alby.sh
|
||||
exit 0;
|
||||
|
@ -22,6 +22,7 @@ OPTIONS+=(PEERING "Connect to a Peer")
|
||||
OPTIONS+=(CHANNEL "Open a Channel with Peer")
|
||||
OPTIONS+=(SEND "Pay an Invoice/PaymentRequest")
|
||||
OPTIONS+=(RECEIVE "Create Invoice/PaymentRequest")
|
||||
OPTIONS+=(XPUB "Show OnChain xPubs")
|
||||
|
||||
if [ "${chain}" = "main" ]; then
|
||||
OPTIONS+=(lnbalance "Detailed Wallet Balances")
|
||||
@ -117,7 +118,7 @@ case $CHOICE in
|
||||
/home/admin/config.scripts/bonus.suez.sh on
|
||||
fi
|
||||
cd /home/bitcoin/suez || exit 1
|
||||
sudo -u bitcoin /home/bitcoin/.local/bin/poetry run ./suez \
|
||||
sudo -u bitcoin poetry run /home/bitcoin/suez/suez \
|
||||
--client-args=-n=${CHAIN} \
|
||||
--client-args=--rpcserver=localhost:1${L2rpcportmod}009
|
||||
echo
|
||||
@ -140,4 +141,16 @@ case $CHOICE in
|
||||
echo "Press ENTER to return to main menu."
|
||||
read key
|
||||
;;
|
||||
XPUB)
|
||||
clear
|
||||
echo "LND wallet xPubs => $lncli_alias wallet accounts list --name default"
|
||||
echo
|
||||
$lncli_alias wallet accounts list --name default | grep --color=never .*,
|
||||
echo
|
||||
echo "EXPERIMENTAL - DONT USE FOR SERIOUS FUND RECEIVING YET"
|
||||
echo "Report your experience to: https://github.com/rootzoll/raspiblitz/issues/2192"
|
||||
echo
|
||||
echo "Press ENTER to return to main menu."
|
||||
read key
|
||||
|
||||
esac
|
||||
|
@ -9,8 +9,6 @@ source <(/home/admin/config.scripts/network.aliases.sh getvars lnd $1)
|
||||
|
||||
sudo mkdir /var/cache/raspiblitz/temp 2>/dev/null
|
||||
|
||||
if ! pip list | grep grpc; then sudo -H python3 -m pip install grpcio==1.38.1; fi
|
||||
|
||||
askLNDbackupCopy()
|
||||
{
|
||||
whiptail --title "LND Data Backup" --yes-button "Backup" --no-button "Skip" --yesno "
|
||||
@ -348,7 +346,7 @@ case $CHOICE in
|
||||
echo
|
||||
echo "Press ENTER when your backup download is done to shutdown."
|
||||
read key
|
||||
/home/admin/config.scripts/blitz.shutdown.sh
|
||||
sudo /home/admin/config.scripts/blitz.shutdown.sh
|
||||
;;
|
||||
RESET-LND)
|
||||
askLNDbackupCopy
|
||||
|
@ -15,6 +15,9 @@ TITLE=" ${CHAIN} System Options "
|
||||
MENU="" # adds lines to HEIGHT
|
||||
OPTIONS=() # adds lines to HEIGHt + CHOICE_HEIGHT
|
||||
|
||||
OPTIONS+=(BTOP "Monitor system resources with btop")
|
||||
OPTIONS+=(TIME "Set Timezone")
|
||||
|
||||
OPTIONS+=(${network}LOG "Monitor the debug.log for ${CHAIN}")
|
||||
OPTIONS+=(${network}CONF "Edit the bitcoin.conf")
|
||||
|
||||
@ -49,6 +52,16 @@ CHOICE=$(dialog --clear \
|
||||
2>&1 >/dev/tty)
|
||||
|
||||
case $CHOICE in
|
||||
BTOP)
|
||||
if ! btop -v; then
|
||||
sudo apt install -y btop
|
||||
fi
|
||||
# run as root to allow signal sending to any process
|
||||
sudo btop
|
||||
;;
|
||||
TIME)
|
||||
sudo /home/admin/config.scripts/blitz.time.sh choose-timezone
|
||||
;;
|
||||
${network}LOG)
|
||||
if [ ${CHAIN} = signet ]; then
|
||||
bitcoinlogpath="/mnt/hdd/bitcoin/signet/debug.log"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
# load raspiblitz config data
|
||||
source /home/admin/_version.info
|
||||
source /home/admin/raspiblitz.info
|
||||
@ -80,7 +80,7 @@ Once the LCD is white and no LEDs are blinking anymore:
|
||||
- Remove the Power from RaspiBlitz
|
||||
- Exchange the old with the new SD card
|
||||
- Connect Power back to the RaspiBlitz
|
||||
- Follow the instructions on the LCD
|
||||
- Login again per SSH or WebUI
|
||||
|
||||
Do you have the SD card with the new version image ready
|
||||
and do you WANT TO START UPDATE NOW?
|
||||
@ -160,7 +160,7 @@ patch()
|
||||
if [ $? -eq 0 ]; then
|
||||
clear
|
||||
echo "REBOOT .."
|
||||
/home/admin/config.scripts/blitz.shutdown.sh reboot
|
||||
sudo /home/admin/config.scripts/blitz.shutdown.sh reboot
|
||||
sleep 8
|
||||
exit 1
|
||||
else
|
||||
@ -182,7 +182,7 @@ patch()
|
||||
whiptail --title "ERROR" --msgbox "${error}" 8 30
|
||||
fi
|
||||
fi
|
||||
patch
|
||||
patch all
|
||||
exit 0
|
||||
;;
|
||||
BRANCH)
|
||||
@ -199,7 +199,7 @@ patch()
|
||||
whiptail --title "ERROR" --msgbox "${error}" 8 30
|
||||
fi
|
||||
fi
|
||||
patch
|
||||
patch all
|
||||
exit 0
|
||||
;;
|
||||
PR)
|
||||
@ -269,11 +269,28 @@ Do you really want to update LND now?
|
||||
if [ ${#error} -gt 0 ]; then
|
||||
whiptail --title "ERROR" --msgbox "${error}" 8 30
|
||||
else
|
||||
# if loop was installed before reinstall
|
||||
if [ "${loop}" == "on" ]; then
|
||||
sudo -u admin /home/admin/config.scripts/bonus.loop.sh on
|
||||
whiptail \
|
||||
--title " LND update " \
|
||||
--yes-button "Reboot" \
|
||||
--no-button "Skip Reboot" \
|
||||
--yesno \
|
||||
"OK LND update is done.
|
||||
|
||||
By default a reboot is advised to sync macaroons and the TLS certificate.
|
||||
Consider rebooting later manually if encountering any problems.
|
||||
" 12 50
|
||||
if [ $? -eq 0 ]; then
|
||||
clear
|
||||
echo "# REBOOT .."
|
||||
sudo /home/admin/config.scripts/blitz.shutdown.sh reboot
|
||||
sleep 8
|
||||
exit 1
|
||||
else
|
||||
echo "# SKIP REBOOT"
|
||||
echo "# starting the lnd.service .."
|
||||
sudo systemctl start lnd
|
||||
exit 0
|
||||
fi
|
||||
/home/admin/config.scripts/blitz.shutdown.sh reboot
|
||||
sleep 8
|
||||
fi
|
||||
;;
|
||||
@ -297,7 +314,28 @@ Do you really want to update LND now?
|
||||
if [ ${#error} -gt 0 ]; then
|
||||
whiptail --title "ERROR" --msgbox "${error}" 8 30
|
||||
else
|
||||
/home/admin/config.scripts/blitz.shutdown.sh reboot
|
||||
whiptail \
|
||||
--title " LND update " \
|
||||
--yes-button "Reboot" \
|
||||
--no-button "Skip Reboot" \
|
||||
--yesno \
|
||||
"OK LND update is done.
|
||||
|
||||
By default a reboot is advised to sync macaroons and the TLS certificate.
|
||||
Consider rebooting later manually if encountering any problems.
|
||||
" 12 50
|
||||
if [ $? -eq 0 ]; then
|
||||
clear
|
||||
echo "# REBOOT .."
|
||||
sudo /home/admin/config.scripts/blitz.shutdown.sh reboot
|
||||
sleep 8
|
||||
exit 1
|
||||
else
|
||||
echo "# SKIP REBOOT"
|
||||
echo "# starting the lnd.service .."
|
||||
sudo systemctl start lnd
|
||||
exit 0
|
||||
fi
|
||||
sleep 8
|
||||
fi
|
||||
;;
|
||||
@ -347,10 +385,10 @@ Do you really want to update Core Lightning now?
|
||||
fi
|
||||
;;
|
||||
RECKLESS)
|
||||
whiptail --title "RECKLESS Core Lightning UPDATE to ${clLatestVersion}" --yes-button "Cancel" --no-button "Update" --yesno "Using the 'RECKLESS' Core Lightning update will simply
|
||||
grab the latest Core Lightning release published on the Core Lightning GitHub page (also release candidates).
|
||||
whiptail --title "RECKLESS Core Lightning UPDATE to ${clLatestVersion}" --yes-button "Cancel" --no-button "Update" \
|
||||
--yesno "Using the 'RECKLESS' Core Lightning update will download the latest Core Lightning release published on the Core Lightning GitHub page.
|
||||
|
||||
There will be no security checks on signature, etc.
|
||||
The update was not tested as a part of the release.
|
||||
|
||||
This update mode is only recommended for testing and
|
||||
development nodes with no serious funding.
|
||||
@ -367,6 +405,10 @@ Do you really want to update Core Lightning now?
|
||||
whiptail --title "ERROR" --msgbox "${error}" 8 30
|
||||
else
|
||||
echo "# Core Lightning was updated successfully"
|
||||
|
||||
# unlock or fix issues from the logs
|
||||
/home/admin/config.scripts/cl.hsmtool.sh unlock ${chain}net
|
||||
|
||||
exit 0
|
||||
fi
|
||||
;;
|
||||
@ -417,11 +459,29 @@ Do you really want to update Bitcoin Core now?
|
||||
|
||||
error=""
|
||||
warn=""
|
||||
source <(sudo -u admin /home/admin/config.scripts/bitcoin.update.sh tested)
|
||||
if [ ${#error} -gt 0 ]; then
|
||||
whiptail --title "ERROR" --msgbox "${error}" 8 30
|
||||
sudo -u admin /home/admin/config.scripts/bitcoin.update.sh tested
|
||||
whiptail \
|
||||
--title " Bitcoin Core update " \
|
||||
--yes-button "Reboot" \
|
||||
--no-button "Skip Reboot" \
|
||||
--yesno \
|
||||
"OK Bitcoin Core update is done.
|
||||
|
||||
By default a reboot is advised.
|
||||
" 9 40
|
||||
if [ $? -eq 0 ]; then
|
||||
clear
|
||||
echo "# REBOOT .."
|
||||
sudo /home/admin/config.scripts/blitz.shutdown.sh reboot
|
||||
sleep 8
|
||||
exit 1
|
||||
else
|
||||
echo "# SKIP REBOOT"
|
||||
echo "# starting the bitcoind.service .."
|
||||
sudo systemctl start bitcoind
|
||||
exit 0
|
||||
fi
|
||||
/home/admin/config.scripts/blitz.shutdown.sh reboot
|
||||
sleep 8
|
||||
;;
|
||||
RECKLESS)
|
||||
whiptail --title "UNTESTED Bitcoin Core update to ${bitcoinLatestVersion}" --yes-button "Cancel" \
|
||||
@ -442,18 +502,60 @@ Do you really want to update Bitcoin Core now?
|
||||
if [ ${#error} -gt 0 ]; then
|
||||
whiptail --title "ERROR" --msgbox "${error}" 8 30
|
||||
fi
|
||||
/home/admin/config.scripts/blitz.shutdown.sh reboot
|
||||
whiptail \
|
||||
--title " Bitcoin Core update " \
|
||||
--yes-button "Reboot" \
|
||||
--no-button "Skip Reboot" \
|
||||
--yesno \
|
||||
"OK Bitcoin Core update is done.
|
||||
|
||||
By default a reboot is advised.
|
||||
" 9 40
|
||||
if [ $? -eq 0 ]; then
|
||||
clear
|
||||
echo "REBOOT .."
|
||||
sudo /home/admin/config.scripts/blitz.shutdown.sh reboot
|
||||
sleep 8
|
||||
exit 1
|
||||
else
|
||||
echo "# SKIP REBOOT"
|
||||
echo "# starting the bitcoind.service .."
|
||||
sudo systemctl start bitcoind
|
||||
exit 0
|
||||
fi
|
||||
sleep 8
|
||||
;;
|
||||
CUSTOM)
|
||||
sudo -u admin /home/admin/config.scripts/bitcoin.update.sh custom
|
||||
/home/admin/config.scripts/blitz.shutdown.sh reboot
|
||||
whiptail \
|
||||
--title " Bitcoin Core update " \
|
||||
--yes-button "Reboot" \
|
||||
--no-button "Skip Reboot" \
|
||||
--yesno \
|
||||
"OK Bitcoin Core update is done.
|
||||
|
||||
By default a reboot is advised.
|
||||
" 9 40
|
||||
if [ $? -eq 0 ]; then
|
||||
clear
|
||||
echo "# REBOOT .."
|
||||
sudo /home/admin/config.scripts/blitz.shutdown.sh reboot
|
||||
sleep 8
|
||||
exit 1
|
||||
else
|
||||
echo "# SKIP REBOOT"
|
||||
echo "# starting the bitcoind.service .."
|
||||
sudo systemctl start bitcoind
|
||||
exit 0
|
||||
fi
|
||||
sleep 8
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# quick call by parameter
|
||||
if [ "$1" == "github" ]; then
|
||||
patch
|
||||
patch all
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@ -476,10 +578,23 @@ if [ "${bos}" == "on" ]; then
|
||||
OPTIONS+=(BOS "Update Balance of Satoshis")
|
||||
fi
|
||||
|
||||
if [ "${ElectRS}" == "on" ]; then
|
||||
OPTIONS+=(ELECTRS "Update Electrs")
|
||||
fi
|
||||
|
||||
if [ "${RTL}" == "on" ]||[ "${cRTL}" == "on" ]; then
|
||||
OPTIONS+=(RTL "Update RTL")
|
||||
fi
|
||||
|
||||
if [ "${thunderhub}" == "on" ]; then
|
||||
OPTIONS+=(THUB "Update ThunderHub")
|
||||
fi
|
||||
|
||||
if [ "${lndg}" == "on" ]; then
|
||||
OPTIONS+=(LNDG "Update LNDg")
|
||||
fi
|
||||
|
||||
## Disabled for now until the base image has Python 3.10
|
||||
if [ "${specter}" == "on" ]; then
|
||||
OPTIONS+=(SPECTER "Update Specter Desktop")
|
||||
fi
|
||||
@ -492,20 +607,16 @@ if [ "${sphinxrelay}" == "on" ]; then
|
||||
OPTIONS+=(SPHINX "Update Sphinx Server Relay")
|
||||
fi
|
||||
|
||||
if [ "${homer}" == "on" ]; then
|
||||
OPTIONS+=(HOMER "Update Homer")
|
||||
fi
|
||||
|
||||
if [ "${mempoolExplorer}" == "on" ]; then
|
||||
OPTIONS+=(MEMPOOL "Update Mempool Explorer")
|
||||
fi
|
||||
|
||||
if [ "${runBehindTor}" == "on" ]; then
|
||||
OPTIONS+=(TOR "Update Tor from the Torproject repo")
|
||||
if [ "${jam}" == "on" ]; then
|
||||
OPTIONS+=(JAM "Update Jam (JoinMarket WebUI)")
|
||||
fi
|
||||
|
||||
if [ "${itchysats}" == "on" ]; then
|
||||
OPTIONS+=(ITCHYSATS "Update ItchySats")
|
||||
if [ "${runBehindTor}" == "on" ]; then
|
||||
OPTIONS+=(TOR "Update Tor from the Torproject repo")
|
||||
fi
|
||||
|
||||
CHOICE_HEIGHT=$(("${#OPTIONS[@]}/2+1"))
|
||||
@ -525,7 +636,7 @@ case $CHOICE in
|
||||
;;
|
||||
PATCH)
|
||||
patchNotice
|
||||
patch
|
||||
patch all
|
||||
;;
|
||||
LND)
|
||||
lnd
|
||||
@ -539,9 +650,18 @@ case $CHOICE in
|
||||
BOS)
|
||||
/home/admin/config.scripts/bonus.bos.sh update
|
||||
;;
|
||||
ELECTRS)
|
||||
/home/admin/config.scripts/bonus.electrs.sh update
|
||||
;;
|
||||
RTL)
|
||||
/home/admin/config.scripts/bonus.rtl.sh update
|
||||
;;
|
||||
THUB)
|
||||
/home/admin/config.scripts/bonus.thunderhub.sh update
|
||||
;;
|
||||
LNDG)
|
||||
/home/admin/config.scripts/bonus.lndg.sh update
|
||||
;;
|
||||
SPECTER)
|
||||
/home/admin/config.scripts/bonus.specter.sh update
|
||||
;;
|
||||
@ -554,13 +674,10 @@ case $CHOICE in
|
||||
TOR)
|
||||
sudo /home/admin/config.scripts/tor.network.sh update
|
||||
;;
|
||||
HOMER)
|
||||
/home/admin/config.scripts/bonus.homer.sh update
|
||||
;;
|
||||
MEMPOOL)
|
||||
/home/admin/config.scripts/bonus.mempool.sh update
|
||||
;;
|
||||
ITCHYSATS)
|
||||
/home/admin/config.scripts/bonus.itchysats.sh update
|
||||
JAM)
|
||||
/home/admin/config.scripts/bonus.jam.sh update
|
||||
;;
|
||||
esac
|
||||
|
@ -97,7 +97,7 @@ echo "******************************"
|
||||
# execute command
|
||||
if [ ${LNTYPE} = "cl" ];then
|
||||
# withdraw destination satoshi [feerate] [minconf] [utxos]
|
||||
command="$lightningcli_alias withdraw ${address} all slow"
|
||||
command="$lightningcli_alias withdraw ${address} all"
|
||||
elif [ ${LNTYPE} = "lnd" ];then
|
||||
command="$lncli_alias sendcoins --sweepall --addr=${address} --conf_target=36"
|
||||
fi
|
||||
|
@ -682,7 +682,7 @@ adjectives = [
|
||||
"picky",
|
||||
"pied",
|
||||
"piggy",
|
||||
"pilar",
|
||||
"pillar",
|
||||
"pink",
|
||||
"plain",
|
||||
"plane",
|
||||
|
@ -648,7 +648,7 @@ piano
|
||||
picky
|
||||
pied
|
||||
piggy
|
||||
pilar
|
||||
pillar
|
||||
pink
|
||||
plain
|
||||
plane
|
||||
|
@ -39,7 +39,7 @@ Have a look at the [Mini-Tutorial](tutorial.md)
|
||||
## Release workflow
|
||||
|
||||
* `make build-ui` - in case there were any changes to the *.ui or *.qrc files
|
||||
* make sure you have all changes added and commited (consider re-basing)
|
||||
* make sure you have all changes added and committed (consider re-basing)
|
||||
* update the version in `blitztui/version.py`
|
||||
* update the `CHANGELOG.md` file (reflect the new version!)
|
||||
* `git add CHANGELOG.md blitztui/version.py`
|
||||
|
@ -25,7 +25,7 @@ Your screen should look similar to this:
|
||||
* (3) this should be reflected in the preview Window
|
||||
* (4) save your changes
|
||||
|
||||
The next step is to transfer (use scp or WinSCP) the updated `home.ui` to the RaspiBlitz.
|
||||
The next step is to transfer (use sftp or WinSCP) the updated `home.ui` to the RaspiBlitz.
|
||||
|
||||
Login to your RaspiBlitz as **admin** (Password A) and change the directory to `~/raspiblitz/home.admin/BlitzTUI`.
|
||||
|
||||
|
@ -1,296 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# command info
|
||||
if [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||
echo "# Turns the RaspiBlitz into HDD CopyStation Mode"
|
||||
echo "# lightning is deactivated during CopyStationMode"
|
||||
echo "# reboot RaspiBlitz to set back to normal mode"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
####### CONFIG #############
|
||||
|
||||
# where to find the BITCOIN data directory (no trailing /)
|
||||
pathBitcoinBlockchain="/mnt/hdd/bitcoin"
|
||||
|
||||
# where to find the RaspiBlitz HDD template directory (no trailing /)
|
||||
pathTemplateHDD="/mnt/hdd/app-storage/templateHDD"
|
||||
|
||||
####### SCRIPT #############
|
||||
|
||||
# check sudo
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "Please run as root (with sudo)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# get HDD info
|
||||
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh status)
|
||||
|
||||
# check if HDD is mounted
|
||||
if [ ${isMounted} -eq 0 ]; then
|
||||
echo "error='HDD is not mounted'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check if HDD is big enough
|
||||
if [ ${hddGigaBytes} -lt 800 ]; then
|
||||
echo "# To run copy station (+/- 1TB needed)"
|
||||
echo "error='HDD is too small'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check that path information is valid
|
||||
if [ -d "$pathBitcoinBlockchain" ]; then
|
||||
echo "# OK found $pathBitcoinBlockchain"
|
||||
else
|
||||
echo "# FAIL path of 'pathBitcoinBlockchain' does not exists: ${pathBitcoinBlockchain}"
|
||||
echo "error='pathBitcoinBlockchain not found'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# make sure that its running in screen
|
||||
# call with '-foreground' to prevent running in screen
|
||||
if [ "$1" != "-foreground" ]; then
|
||||
screenPID=$(screen -ls | grep "copystation" | cut -d "." -f1 | xargs)
|
||||
if [ ${#screenPID} -eq 0 ]; then
|
||||
# start copystation in screen
|
||||
echo "# starting copystation screen session"
|
||||
screen -S copystation -dm /home/admin/XXcopyStation.sh -foreground
|
||||
screen -d -r
|
||||
exit 0
|
||||
else
|
||||
echo "# changing into running copystation screen session"
|
||||
screen -d -r
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
clear
|
||||
echo "# ******************************"
|
||||
echo "# RASPIBLITZ COPYSTATION SCRIPT"
|
||||
echo "# ******************************"
|
||||
echo
|
||||
echo "Make sure that no target HDD/SSDs are not connected yet .."
|
||||
echo
|
||||
sudo sed -i "s/^state=.*/state=copystation/g" /home/admin/raspiblitz.info 2>/dev/null
|
||||
sleep 10
|
||||
|
||||
echo "*** CHECKING CONFIG"
|
||||
|
||||
# check that path information is valid
|
||||
if [ -d "$pathTemplateHDD" ]; then
|
||||
echo "# OK found $pathTemplateHDD"
|
||||
else
|
||||
echo "# Creating: ${pathTemplateHDD}"
|
||||
mkdir ${pathTemplateHDD}
|
||||
chmod 777 ${pathTemplateHDD}
|
||||
fi
|
||||
|
||||
# make sure that lnd is stopped (if running)
|
||||
systemctl stop lnd 2>/dev/null
|
||||
systemctl stop background 2>/dev/null
|
||||
|
||||
# finding system drives (the drives that should not be synced to)
|
||||
echo "# OK - the following drives detected as the system drive: $datadisk"
|
||||
echo
|
||||
|
||||
# BASIC IDEA:
|
||||
# 1. get fresh data from bitcoind --> template data
|
||||
# 2. detect HDDs
|
||||
# 3. sync HDDs with template data
|
||||
# repeat
|
||||
|
||||
echo
|
||||
echo "*** RUNNING ***"
|
||||
lastBlockchainUpdateTimestamp=1
|
||||
firstLoop=1
|
||||
|
||||
while :
|
||||
do
|
||||
|
||||
# reset external data stores (needed because local vars dont work in deeper while loops)
|
||||
echo "" > /var/cache/raspiblitz/copystationHddsInfoString.tmp
|
||||
rm /var/cache/raspiblitz/copystationFoundTargets.flag
|
||||
|
||||
################################################
|
||||
# 1. get fresh data from bitcoind for template data (skip on first loop)
|
||||
|
||||
# only execute every 30min
|
||||
nowTimestamp=$(date +%s)
|
||||
secondsDiff=$(echo "${nowTimestamp}-${lastBlockchainUpdateTimestamp}" | bc)
|
||||
echo "# seconds since last update from bitcoind: ${secondsDiff}"
|
||||
echo
|
||||
|
||||
if [ ${secondsDiff} -gt 3000 ]; then
|
||||
|
||||
echo "******************************"
|
||||
echo "Bitcoin Blockchain Update"
|
||||
echo "******************************"
|
||||
|
||||
# stop blockchains
|
||||
echo "# Stopping Blockchain ..."
|
||||
systemctl stop bitcoind 2>/dev/null
|
||||
sleep 10
|
||||
|
||||
# sync bitcoin
|
||||
echo "# Syncing Bitcoin to template folder ..."
|
||||
/home/admin/_cache.sh set message "Updating Template: Bitcoin"
|
||||
|
||||
# make sure the bitcoin directory in template folder exists
|
||||
if [ ! -d "$pathTemplateHDD/bitcoin" ]; then
|
||||
echo "# creating the bitcoin subfolder in the template folder"
|
||||
mkdir ${pathTemplateHDD}/bitcoin
|
||||
chmod 777 ${pathTemplateHDD}/bitcoin
|
||||
fi
|
||||
|
||||
# do the sync to the template folder for BITCOIN
|
||||
rsync -a --info=progress2 --delete ${pathBitcoinBlockchain}/chainstate ${pathBitcoinBlockchain}/blocks ${pathTemplateHDD}/bitcoin
|
||||
|
||||
# restart bitcoind (to let further setup while syncing HDDs)
|
||||
echo "# Restarting Blockchain ..."
|
||||
systemctl start bitcoind 2>/dev/null
|
||||
|
||||
# update timer
|
||||
lastBlockchainUpdateTimestamp=$(date +%s)
|
||||
fi
|
||||
|
||||
################################################
|
||||
# 2. detect connected HDDs and loop thru them
|
||||
|
||||
echo
|
||||
echo "**************************************"
|
||||
echo "SYNCING TEMPLATE -> CONNECTED HDD/SSDs"
|
||||
echo "**************************************"
|
||||
sleep 2
|
||||
lsblk -o NAME | grep "^[s|v]d" | while read -r detectedDrive ; do
|
||||
isSystemDrive=$(echo "${datadisk}" | grep -c "${detectedDrive}")
|
||||
if [ ${isSystemDrive} -eq 0 ]; then
|
||||
|
||||
# remember that disks were found
|
||||
touch /var/cache/raspiblitz/copystationFoundTargets.flag
|
||||
|
||||
# check if drives 1st partition is named BLOCKCHAIN & in EXT4 format
|
||||
isNamedBlockchain=$(lsblk -o NAME,FSTYPE,LABEL | grep "${detectedDrive}" | grep -c "BLOCKCHAIN")
|
||||
isFormatExt4=$(lsblk -o NAME,FSTYPE,LABEL | grep "${detectedDrive}" | grep -c "ext4")
|
||||
|
||||
# init a fresh device
|
||||
if [ ${isNamedBlockchain} -eq 0 ] || [ ${isFormatExt4} -eq 0 ]; then
|
||||
|
||||
echo
|
||||
echo "**************************************************************"
|
||||
echo "*** NEW EMPTY HDD FOUND ---> ${detectedDrive}"
|
||||
echo "isNamedBlockchain: ${isNamedBlockchain}"
|
||||
echo "isFormatExt4:" ${isFormatExt4}
|
||||
|
||||
# check if size is OK
|
||||
size=$(lsblk -o NAME,SIZE -b | grep "^${detectedDrive}" | awk '$1=$1' | cut -d " " -f 2)
|
||||
echo "size: ${size}"
|
||||
if [ ${size} -lt 900000000000 ]; then
|
||||
echo "# THE HDD/SSD IS TOO SMALL <900GB - use at least 1TB"
|
||||
/home/admin/_cache.sh set message "HDD smaller than 1TB: ${detectedDrive}"
|
||||
echo
|
||||
sleep 10
|
||||
else
|
||||
|
||||
choice=0
|
||||
/home/admin/_cache.sh set message "Formatting new HDD: ${detectedDrive}"
|
||||
|
||||
# format the HDD
|
||||
echo "Starting Formatting of device ${detectedDrive} ..."
|
||||
/home/admin/config.scripts/blitz.datadrive.sh format ext4 ${detectedDrive}
|
||||
sleep 4
|
||||
|
||||
fi
|
||||
|
||||
else
|
||||
echo
|
||||
echo "*** ALREADY ACTIVE HDD FOUND ---> ${detectedDrive}"
|
||||
sleep 1
|
||||
fi
|
||||
|
||||
################################################
|
||||
# 3. sync HDD with template data (skip on first loop)
|
||||
|
||||
partition=$(lsblk -o NAME,FSTYPE,LABEL | grep "${detectedDrive}" | grep "BLOCKCHAIN" | cut -d ' ' -f 1 | tr -cd "[:alnum:]")
|
||||
if [ "${firstLoop}" != "1" ] && [ ${#partition} -gt 0 ]; then
|
||||
|
||||
# temp mount device
|
||||
echo "mounting: ${partition}"
|
||||
mkdir /mnt/hdd2 2>/dev/null
|
||||
mount -t ext4 /dev/${partition} /mnt/hdd2
|
||||
|
||||
# rsync device
|
||||
mountOK=$(lsblk -o NAME,MOUNTPOINT | grep "${detectedDrive}" | grep -c "/mnt/hdd2")
|
||||
if [ ${mountOK} -eq 1 ]; then
|
||||
hddsInfoString=$(cat /var/cache/raspiblitz/copystationHddsInfoString.tmp | tr '\n' ' ')
|
||||
/home/admin/_cache.sh set message "${hddsInfoString} ${partition}>SYNC"
|
||||
rsync -a --info=progress2 --delete ${pathTemplateHDD}/* /mnt/hdd2
|
||||
chmod -R 777 /mnt/hdd2
|
||||
rm -r /mnt/hdd2/lost+found 2>/dev/null
|
||||
echo "${partition}>OK" >> /var/cache/raspiblitz/copystationHddsInfoString.tmp
|
||||
else
|
||||
echo "# FAIL: was not able to mount --> ${partition}"
|
||||
fi
|
||||
|
||||
# unmount device
|
||||
umount -l /mnt/hdd2
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
done
|
||||
|
||||
# check for flag
|
||||
foundTargets=$(ls /var/cache/raspiblitz/copystationFoundTargets.flag 2>/dev/null | grep -c "copystationFoundTargets.flag")
|
||||
hddsInfoString=$(cat /var/cache/raspiblitz/copystationHddsInfoString.tmp | tr '\n' ' ')
|
||||
|
||||
clear
|
||||
if [ "${foundTargets}" == "1" ] && [ "${firstLoop}" == "1" ]; then
|
||||
|
||||
# after script found discs and did formatting ... go into full loop
|
||||
echo "OK first loop done ..."
|
||||
firstLoop=0
|
||||
sleep 1
|
||||
|
||||
elif [ "${foundTargets}" == "0" ]; then
|
||||
|
||||
echo "**** NO TARGET HDD/SSDs CONNECTED ****"
|
||||
echo
|
||||
echo "Best way to start a new batch:"
|
||||
echo "- Disconnect powered USB-Hub (best unplug USB cable at USB-Hub)"
|
||||
echo "- Connect all HDD/SSDs to the disconnected USB-Hub"
|
||||
echo "- Connect powered USB-Hub to Blitz (plug USB cable in)"
|
||||
echo "- During formatting remember names of physical HDD/SSDs"
|
||||
echo "- As soon as you see an OK for that HDD/SSD name you can remove it"
|
||||
echo
|
||||
echo "Next round starts in 30 seconds ..."
|
||||
echo "To stop copystation script: CTRL+c and then 'restart'"
|
||||
echo "You can close SSH terminal and script will run in background can can be re-entered."
|
||||
|
||||
/home/admin/_cache.sh set message "No target HDDs connected - connect USB Hub"
|
||||
firstLoop=1
|
||||
sleep 30
|
||||
|
||||
else
|
||||
|
||||
echo "**** SYNC LOOP DONE ****"
|
||||
echo "HDDs ready synced:"
|
||||
cat /var/cache/raspiblitz/copystationHddsInfoString.tmp
|
||||
echo
|
||||
echo "*************************"
|
||||
echo
|
||||
echo "Next round starts in 25 seconds ..."
|
||||
echo "To stop copystation script: CTRL+c and then 'restart'"
|
||||
echo "You can close SSH terminal and script will run in background can can be re-entered."
|
||||
|
||||
/home/admin/_cache.sh set message "Ready HDDs: ${hddsInfoString}"
|
||||
sleep 25
|
||||
|
||||
fi
|
||||
|
||||
clear
|
||||
echo "starting new sync loop"
|
||||
sleep 5
|
||||
|
||||
done
|
@ -13,7 +13,7 @@ if [ "$1" == "only-one-loop" ]; then
|
||||
fi
|
||||
# start with parameter "install" (to setup service as systemd background running)
|
||||
if [ "$1" == "install" ]; then
|
||||
|
||||
|
||||
# write systemd service
|
||||
cat > /etc/systemd/system/background.scan.service <<EOF
|
||||
# Monitor the RaspiBlitz State
|
||||
@ -56,7 +56,7 @@ configFile="/mnt/hdd/raspiblitz.conf"
|
||||
# INFOFILE - persited state data
|
||||
infoFile="/home/admin/raspiblitz.info"
|
||||
|
||||
# better readbale seconds (slightly off to reduce same time window trigger)
|
||||
# better readable seconds (slightly off to reduce same time window trigger)
|
||||
MINUTE=60
|
||||
MINUTE2=115
|
||||
MINUTE5=290
|
||||
@ -74,21 +74,21 @@ YEAR=31536000
|
||||
usermod -G bitcoin root
|
||||
|
||||
####################################################################
|
||||
# INIT
|
||||
# INIT
|
||||
####################################################################
|
||||
|
||||
# init values
|
||||
/home/admin/_cache.sh set system_temp_celsius "0"
|
||||
/home/admin/_cache.sh set system_temp_fahrenheit "0"
|
||||
/home/admin/_cache.sh set system_count_longscan "0"
|
||||
/home/admin/_cache.sh set system_count_undervoltage "0"
|
||||
/home/admin/_cache.sh set system_count_start_blockchain "0"
|
||||
/home/admin/_cache.sh set system_count_start_lightning "0"
|
||||
/home/admin/_cache.sh set system_count_start_tui "0"
|
||||
/home/admin/_cache.sh set btc_default_peers "0"
|
||||
/home/admin/_cache.sh set btc_default_sync_percentage "0"
|
||||
/home/admin/_cache.sh set btc_default_address ""
|
||||
/home/admin/_cache.sh set btc_default_port ""
|
||||
/home/admin/_cache.sh init system_temp_celsius "0"
|
||||
/home/admin/_cache.sh init system_temp_fahrenheit "0"
|
||||
/home/admin/_cache.sh init system_count_longscan "0"
|
||||
/home/admin/_cache.sh init system_count_undervoltage "0"
|
||||
/home/admin/_cache.sh init system_count_start_blockchain "0"
|
||||
/home/admin/_cache.sh init system_count_start_lightning "0"
|
||||
/home/admin/_cache.sh init system_count_start_tui "0"
|
||||
/home/admin/_cache.sh init btc_default_peers "0"
|
||||
/home/admin/_cache.sh init btc_default_sync_percentage "0"
|
||||
/home/admin/_cache.sh init btc_default_address ""
|
||||
/home/admin/_cache.sh init btc_default_port ""
|
||||
|
||||
# import all base values from raspiblitz.info
|
||||
echo "importing: ${infoFile}"
|
||||
@ -105,41 +105,31 @@ fi
|
||||
echo "importing: _version.info"
|
||||
/home/admin/_cache.sh import /home/admin/_version.info
|
||||
|
||||
# basic hardware info (will not change)
|
||||
source <(/home/admin/_cache.sh valid \
|
||||
system_board \
|
||||
system_ram_mb \
|
||||
system_ram_gb \
|
||||
)
|
||||
if [ "${stillvalid}" == "0" ]; then
|
||||
source <(/home/admin/config.scripts/blitz.hardware.sh status)
|
||||
/home/admin/_cache.sh set system_board "${board}"
|
||||
/home/admin/_cache.sh set system_ram_mb "${ramMB}"
|
||||
/home/admin/_cache.sh set system_ram_gb "${ramGB}"
|
||||
fi
|
||||
|
||||
# VM detect vagrant
|
||||
source <(/home/admin/_cache.sh valid system_vm_vagrant)
|
||||
if [ "${stillvalid}" == "0" ]; then
|
||||
vagrant=$(df | grep -c "/vagrant")
|
||||
/home/admin/_cache.sh set system_vm_vagrant "${vagrant}"
|
||||
fi
|
||||
# get hardware info
|
||||
source <(/home/admin/config.scripts/blitz.hardware.sh status)
|
||||
/home/admin/_cache.sh set system_board "${board}"
|
||||
/home/admin/_cache.sh set system_ram_mb "${ramMB}"
|
||||
/home/admin/_cache.sh set system_ram_gb "${ramGB}"
|
||||
|
||||
# flag that init was done (will be checked on each loop)
|
||||
/home/admin/_cache.sh set system_init_time "$(date +%s)"
|
||||
|
||||
# add info about start to raspiblitz.log
|
||||
echo "INFO: _bootstrap.scan.sh loop started > sudo journalctl -f -u background.scan" >> /home/admin/raspiblitz.log
|
||||
|
||||
while [ 1 ]
|
||||
do
|
||||
|
||||
####################################################################
|
||||
# LOOP DATA (BASIC SYSTEM)
|
||||
# data that is always available
|
||||
# LOOP DATA (BASIC SYSTEM)
|
||||
# data that is always available
|
||||
####################################################################
|
||||
|
||||
# check that redis contains init data (detect possible restart of redis)
|
||||
source <(/home/admin/_cache.sh get system_init_time)
|
||||
if [ "${system_init_time}" == "" ]; then
|
||||
echo "FAIL: CACHE IS MISSING INIT DATA ... exiting to let systemd restart"
|
||||
echo "INFO: _bootstrap.scan.sh -> cache not running - exiting" >> /home/admin/raspiblitz.log
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -147,11 +137,13 @@ do
|
||||
startTime=$(date +%s)
|
||||
|
||||
#################
|
||||
# BASIC SYSTEM
|
||||
# BASIC SYSTEM
|
||||
|
||||
# uptime just do on every run
|
||||
system_up=$(cat /proc/uptime | grep -o '^[0-9]\+')
|
||||
system_up_text=$(uptime -p | cut -d ' ' -f 2- | cut -d ',' -f 1 | awk '{print $1 substr($2, 1, 1)}')
|
||||
/home/admin/_cache.sh set system_up "${system_up}"
|
||||
/home/admin/_cache.sh set system_up_text "${system_up_text}"
|
||||
|
||||
# cpu load
|
||||
cpu_load=$(w | head -n 1 | cut -d 'v' -f2 | cut -d ':' -f2)
|
||||
@ -167,9 +159,7 @@ do
|
||||
fi
|
||||
|
||||
# ram
|
||||
ram=$(free -m | grep Mem | awk '{ print $2 }')
|
||||
ram_avail=$(free -m | grep Mem | awk '{ print $7 }')
|
||||
/home/admin/_cache.sh set system_ram_mb "${ram}"
|
||||
ram_avail=$(free -m | grep -E 'Mem|Speicher' | awk '{ print $7 }')
|
||||
/home/admin/_cache.sh set system_ram_available_mb "${ram_avail}"
|
||||
|
||||
# undervoltage
|
||||
@ -268,6 +258,29 @@ do
|
||||
/home/admin/_cache.sh set internet_online "${online}"
|
||||
fi
|
||||
|
||||
###################
|
||||
# HARDDRIVE
|
||||
|
||||
# info on storage medium
|
||||
source <(/home/admin/_cache.sh valid hdd_mounted)
|
||||
if [ "${stillvalid}" == "0" ] || [ ${age} -gt ${MINUTE2} ]; then
|
||||
echo "updating: /home/admin/config.scripts/blitz.datadrive.sh status"
|
||||
source <(/home/admin/config.scripts/blitz.datadrive.sh status)
|
||||
/home/admin/_cache.sh set hdd_mounted "${isMounted}"
|
||||
/home/admin/_cache.sh set hdd_ssd "${isSSD}"
|
||||
/home/admin/_cache.sh set hdd_btrfs "${isBTRFS}"
|
||||
/home/admin/_cache.sh set hdd_raid "${isRaid}"
|
||||
/home/admin/_cache.sh set hdd_uasp "${hddAdapterUSAP}"
|
||||
/home/admin/_cache.sh set hdd_capacity_bytes "${hddBytes}"
|
||||
/home/admin/_cache.sh set hdd_capacity_gb "${hddGigaBytes}"
|
||||
/home/admin/_cache.sh set hdd_free_bytes "${hddDataFreeBytes}"
|
||||
/home/admin/_cache.sh set hdd_free_gb "${hddDataFreeGB}"
|
||||
/home/admin/_cache.sh set hdd_used_info "${hddUsedInfo}"
|
||||
/home/admin/_cache.sh set hddTemperature "${hddTemperature}"
|
||||
/home/admin/_cache.sh set hddTBSize "${hddTBSize}"
|
||||
|
||||
fi
|
||||
|
||||
# exit if still setup or higher system stopped
|
||||
source <(/home/admin/_cache.sh get setupPhase state)
|
||||
if [ "${setupPhase}" != "done" ] ||
|
||||
@ -296,25 +309,6 @@ do
|
||||
# read/update config values
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
|
||||
###################
|
||||
# HARDDRIVE
|
||||
|
||||
if [ "${stillvalid}" == "0" ] || [ ${age} -gt ${MINUTE2} ]; then
|
||||
echo "updating: /home/admin/config.scripts/blitz.datadrive.sh status"
|
||||
source <(/home/admin/config.scripts/blitz.datadrive.sh status)
|
||||
/home/admin/_cache.sh set hdd_mounted "${isMounted}"
|
||||
/home/admin/_cache.sh set hdd_ssd "${isSSD}"
|
||||
/home/admin/_cache.sh set hdd_btrfs "${isBTRFS}"
|
||||
/home/admin/_cache.sh set hdd_raid "${isRaid}"
|
||||
/home/admin/_cache.sh set hdd_uasp "${hddAdapterUSAP}"
|
||||
/home/admin/_cache.sh set hdd_capacity_bytes "${hddBytes}"
|
||||
/home/admin/_cache.sh set hdd_capacity_gb "${hddGigaBytes}"
|
||||
/home/admin/_cache.sh set hdd_free_bytes "${hddDataFreeBytes}"
|
||||
/home/admin/_cache.sh set hdd_free_gb "${hddDataFreeGB}"
|
||||
/home/admin/_cache.sh set hdd_used_info "${hddUsedInfo}"
|
||||
/home/admin/_cache.sh set hdd_blockchain_data "${hddBlocksBitcoin}"
|
||||
fi
|
||||
|
||||
###################
|
||||
# BITCOIN
|
||||
|
||||
@ -396,7 +390,7 @@ do
|
||||
|
||||
# update detail infos only when ready (get as value from cache)
|
||||
source <(/home/admin/_cache.sh meta btc_${CHAIN}net_ready)
|
||||
if [ "${value}" == "1" ]; then
|
||||
if [ "${value}" == "1" ]; then
|
||||
|
||||
# check if network needs update
|
||||
source <(/home/admin/_cache.sh valid \
|
||||
@ -432,7 +426,7 @@ do
|
||||
/home/admin/_cache.sh set btc_${CHAIN}net_sync_progress "${btc_sync_progress}"
|
||||
/home/admin/_cache.sh set btc_${CHAIN}net_sync_percentage "${btc_sync_percentage}"
|
||||
/home/admin/_cache.sh set btc_${CHAIN}net_sync_initialblockdownload "${btc_sync_initialblockdownload}"
|
||||
|
||||
|
||||
if [ "${isDefaultChain}" == "1" ]; then
|
||||
/home/admin/_cache.sh set btc_default_synced "${btc_synced}"
|
||||
/home/admin/_cache.sh set btc_default_blocks_headers "${btc_blocks_headers}"
|
||||
@ -565,7 +559,7 @@ do
|
||||
fi
|
||||
if [ "${stillvalid}" == "0" ] || [ ${age} -gt ${CYCLE_QUICK} ]; then
|
||||
echo "updating: /home/admin/config.scripts/lnd.monitor.sh ${CHAIN}net status"
|
||||
source <(/home/admin/config.scripts/lnd.monitor.sh ${CHAIN}net status)
|
||||
source <(timeout 30s /home/admin/config.scripts/lnd.monitor.sh ${CHAIN}net status)
|
||||
/home/admin/_cache.sh set ln_lnd_${CHAIN}net_activated "1"
|
||||
/home/admin/_cache.sh set ln_lnd_${CHAIN}net_locked "${ln_lnd_locked}"
|
||||
/home/admin/_cache.sh set ln_lnd_${CHAIN}net_version "${ln_lnd_version}"
|
||||
@ -595,7 +589,7 @@ do
|
||||
if [ "${stillvalid}" == "0" ] || [ ${age} -gt ${CYCLE_LONG} ]; then
|
||||
error=""
|
||||
echo "updating: /home/admin/config.scripts/lnd.monitor.sh ${CHAIN}net config"
|
||||
source <(/home/admin/config.scripts/lnd.monitor.sh ${CHAIN}net config)
|
||||
source <(timeout 30s /home/admin/config.scripts/lnd.monitor.sh ${CHAIN}net config)
|
||||
if [ "${error}" == "" ]; then
|
||||
/home/admin/_cache.sh set ln_lnd_${CHAIN}net_alias "${ln_lnd_alias}"
|
||||
if [ "${isDefaultLightning}" == "1" ] && [ "${isDefaultChain}" == "1" ]; then
|
||||
@ -638,7 +632,7 @@ do
|
||||
if [ "${stillvalid}" == "0" ] || [ ${age} -gt ${CYCLE_MID} ]; then
|
||||
error=""
|
||||
echo "updating: /home/admin/config.scripts/lnd.monitor.sh ${CHAIN}net info"
|
||||
source <(/home/admin/config.scripts/lnd.monitor.sh ${CHAIN}net info)
|
||||
source <(timeout 30s /home/admin/config.scripts/lnd.monitor.sh ${CHAIN}net info)
|
||||
if [ "${error}" == "" ]; then
|
||||
/home/admin/_cache.sh set ln_lnd_${CHAIN}net_address "${ln_lnd_address}"
|
||||
/home/admin/_cache.sh set ln_lnd_${CHAIN}net_tor "${ln_lnd_tor}"
|
||||
@ -688,7 +682,7 @@ do
|
||||
if [ "${stillvalid}" == "0" ] || [ ${age} -gt ${CYCLE_QUICK} ]; then
|
||||
error=""
|
||||
echo "updating: /home/admin/config.scripts/lnd.monitor.sh ${CHAIN}net wallet"
|
||||
source <(/home/admin/config.scripts/lnd.monitor.sh ${CHAIN}net wallet)
|
||||
source <(timeout 30s /home/admin/config.scripts/lnd.monitor.sh ${CHAIN}net wallet)
|
||||
if [ "${error}" == "" ]; then
|
||||
/home/admin/_cache.sh set ln_lnd_${CHAIN}net_wallet_onchain_balance "${ln_lnd_wallet_onchain_balance}"
|
||||
/home/admin/_cache.sh set ln_lnd_${CHAIN}net_wallet_onchain_pending "${ln_lnd_wallet_onchain_pending}"
|
||||
@ -720,7 +714,7 @@ do
|
||||
if [ "${stillvalid}" == "0" ] || [ ${age} -gt ${CYCLE_LONG} ]; then
|
||||
error=""
|
||||
echo "updating: /home/admin/config.scripts/lnd.monitor.sh ${CHAIN}net fees"
|
||||
source <(/home/admin/config.scripts/lnd.monitor.sh ${CHAIN}net fees)
|
||||
source <(timeout 30s /home/admin/config.scripts/lnd.monitor.sh ${CHAIN}net fees)
|
||||
if [ "${error}" == "" ]; then
|
||||
/home/admin/_cache.sh set ln_lnd_${CHAIN}net_fees_daily "${ln_lnd_fees_daily}"
|
||||
/home/admin/_cache.sh set ln_lnd_${CHAIN}net_fees_weekly "${ln_lnd_fees_weekly}"
|
||||
@ -795,7 +789,7 @@ do
|
||||
fi
|
||||
if [ "${stillvalid}" == "0" ] || [ ${age} -gt ${CYCLE_QUICK} ]; then
|
||||
echo "updating: /home/admin/config.scripts/cl.monitor.sh ${CHAIN}net status"
|
||||
source <(/home/admin/config.scripts/cl.monitor.sh ${CHAIN}net status)
|
||||
source <(timeout 30s /home/admin/config.scripts/cl.monitor.sh ${CHAIN}net status)
|
||||
/home/admin/_cache.sh set ln_cl_${CHAIN}net_activated "1"
|
||||
/home/admin/_cache.sh set ln_cl_${CHAIN}net_version "${ln_cl_version}"
|
||||
/home/admin/_cache.sh set ln_cl_${CHAIN}net_running "${ln_cl_running}"
|
||||
@ -850,7 +844,7 @@ do
|
||||
if [ "${stillvalid}" == "0" ] || [ ${age} -gt ${CYCLE_MID} ]; then
|
||||
error=""
|
||||
echo "updating: /home/admin/config.scripts/cl.monitor.sh ${CHAIN}net info"
|
||||
source <(/home/admin/config.scripts/cl.monitor.sh ${CHAIN}net info)
|
||||
source <(timeout 30s /home/admin/config.scripts/cl.monitor.sh ${CHAIN}net info)
|
||||
if [ "${error}" == "" ]; then
|
||||
/home/admin/_cache.sh set ln_cl_${CHAIN}net_alias "${ln_cl_alias}"
|
||||
/home/admin/_cache.sh set ln_cl_${CHAIN}net_address "${ln_cl_address}"
|
||||
@ -904,7 +898,7 @@ do
|
||||
if [ "${stillvalid}" == "0" ] || [ ${age} -gt ${CYCLE_MID} ]; then
|
||||
error=""
|
||||
echo "updating: /home/admin/config.scripts/cl.monitor.sh ${CHAIN}net wallet"
|
||||
source <(/home/admin/config.scripts/cl.monitor.sh ${CHAIN}net wallet)
|
||||
source <(timeout 30s /home/admin/config.scripts/cl.monitor.sh ${CHAIN}net wallet)
|
||||
if [ "${error}" == "" ]; then
|
||||
/home/admin/_cache.sh set ln_cl_${CHAIN}net_wallet_onchain_balance "${ln_cl_wallet_onchain_balance}"
|
||||
/home/admin/_cache.sh set ln_cl_${CHAIN}net_wallet_onchain_pending "${ln_cl_wallet_onchain_pending}"
|
||||
@ -1044,7 +1038,7 @@ do
|
||||
# if was started with special parameter
|
||||
if [ "${ONLY_ONE_LOOP}" == "1" ]; then
|
||||
echo "Exiting because ONLY_ONE_LOOP==1"
|
||||
exit 0
|
||||
exit 0
|
||||
fi
|
||||
|
||||
done
|
||||
|
@ -13,11 +13,21 @@ configFile="/mnt/hdd/raspiblitz.conf"
|
||||
# LOGS see: sudo journalctl -f -u background
|
||||
|
||||
echo "_background.sh STARTED"
|
||||
echo "INFO: _background.sh loop started - sudo journalctl -f -u background" >> /home/admin/raspiblitz.log
|
||||
|
||||
# global vars
|
||||
blitzTUIHeartBeatLine=""
|
||||
/home/admin/_cache.sh set blitzTUIRestarts "0"
|
||||
|
||||
# determine correct raspberrypi boot drive path (that easy to access when sd card is insert into laptop)
|
||||
raspi_bootdir=""
|
||||
if [ -d /boot/firmware ]; then
|
||||
raspi_bootdir="/boot/firmware"
|
||||
elif [ -d /boot ]; then
|
||||
raspi_bootdir="/boot"
|
||||
fi
|
||||
echo "# raspi_bootdir(${raspi_bootdir})"
|
||||
|
||||
counter=0
|
||||
while [ 1 ]
|
||||
do
|
||||
@ -42,8 +52,7 @@ do
|
||||
# source info & config file fresh on every loop
|
||||
source ${infoFile} 2>/dev/null
|
||||
source ${configFile} 2>/dev/null
|
||||
source <(/home/admin/_cache.sh get state setupPhase)
|
||||
|
||||
|
||||
####################################################
|
||||
# SKIP BACKGROUND TASK LOOP ON CERTAIN SYSTEM STATES
|
||||
# https://github.com/rootzoll/raspiblitz/issues/160
|
||||
@ -76,6 +85,18 @@ do
|
||||
continue
|
||||
fi
|
||||
|
||||
####################################################
|
||||
# MONITOR LOG SIZES
|
||||
# https://github.com/rootzoll/raspiblitz/issues/2659
|
||||
####################################################
|
||||
|
||||
# once a day
|
||||
recheckLogs=$((($counter % 86400)+2))
|
||||
if [ ${recheckLogs} -eq 1 ]; then
|
||||
echo "*** MONITOR LOG SIZES ***"
|
||||
journalctl --vacuum-size=100M
|
||||
fi
|
||||
|
||||
####################################################
|
||||
# RECHECK DHCP-SERVER
|
||||
# https://github.com/rootzoll/raspiblitz/issues/160
|
||||
@ -92,8 +113,7 @@ do
|
||||
|
||||
# detect a missing DHCP config
|
||||
if [ "${localip:0:4}" = "169." ]; then
|
||||
echo "Missing DHCP detected ... trying emergency reboot"
|
||||
/home/admin/config.scripts/blitz.shutdown.sh reboot
|
||||
echo "Missing DHCP detected ..."
|
||||
else
|
||||
echo "DHCP OK"
|
||||
fi
|
||||
@ -232,6 +252,36 @@ do
|
||||
echo "Blockchain Sync Monitoring: ZERO PEERS DETECTED .. doing out-of-band kickstart"
|
||||
/home/admin/config.scripts/bitcoin.monitor.sh mainnet peer-kickstart
|
||||
fi
|
||||
if [ "${i2pd}" == "on" ] && [ "${btc_peers_i2p}" == "0" ] && [ "${btc_running}" == "1" ]; then
|
||||
echo "Blockchain Sync Monitoring: IP2TOR 0 peers .. doing out-of-band kickstart"
|
||||
/home/admin/config.scripts/bitcoin.monitor.sh mainnet peer-kickstart i2p
|
||||
fi
|
||||
fi
|
||||
|
||||
###############################
|
||||
# SYSTEM LOG FILE SIZES
|
||||
###############################
|
||||
|
||||
# check every 15min
|
||||
recheckSync=$(($counter % 900))
|
||||
if [ ${recheckSync} -eq 1 ]; then
|
||||
echo "*** CHECK LOG FILE SIZES ***"
|
||||
# check if log file is getting too big
|
||||
logsMegaByte=$(sudo du -c -m /var/log | grep "total" | awk '{print $1;}')
|
||||
if [ ${logsMegaByte} -gt 5000 ]; then
|
||||
echo "WARN # Logs /var/log in are bigger then 5GB .. starting repair"
|
||||
debuginfo=$(ls -la /var/log/ 2>/dev/null)
|
||||
# dont delete directories - can make services crash
|
||||
sudo rm /var/log/*
|
||||
sudo touch /var/log/auth.log
|
||||
sudo chown root:adm /var/log/auth.log
|
||||
sudo service rsyslog restart
|
||||
/home/admin/config.scripts/blitz.error.sh _background.sh "log-delete" "REPAIR: /var/log/ >5GB" "Logs in /var/log in were bigger then 5GB and got emergency delete to prevent fillup." "${debuginfo}"
|
||||
sleep 10
|
||||
else
|
||||
echo "OK - logs are at ${logsMegaByte} MB - within safety limit"
|
||||
fi
|
||||
echo ""
|
||||
fi
|
||||
|
||||
####################################################
|
||||
@ -262,7 +312,7 @@ do
|
||||
# first check if flags need to be reset (manually delete of blockchain)
|
||||
if [ "${flagBtcDone}" == "1" ] && [ "${flagBtcActive}" == "1" ]; then
|
||||
flagBtcDone=0
|
||||
/home/admin/config.scripts/blitz.conf.sh set btc_${CHAIN}net_sync_initial_done ${flagBtcDone} /home/admin/raspiblitz.info
|
||||
/home/admin/config.scripts/blitz.conf.sh set btc_${CHAIN}net_sync_initial_done ${flagBtcDone} /home/admin/raspiblitz.info
|
||||
echo "EVENT --> btc_${CHAIN}net_sync_initial_done changed to ${flagBtcDone}"
|
||||
fi
|
||||
|
||||
@ -276,7 +326,7 @@ do
|
||||
# when started done is set - but not not active anymore --> end of IDB event detected
|
||||
if [ "${flagBtcDone}" == "0" ] && [ "${flagBtcOnline}" == "1" ] && [ "${flagBtcSynced}" == "1" ]; then
|
||||
flagBtcDone=1
|
||||
/home/admin/config.scripts/blitz.conf.sh set btc_${CHAIN}net_sync_initial_done ${flagBtcDone} /home/admin/raspiblitz.info
|
||||
/home/admin/config.scripts/blitz.conf.sh set btc_${CHAIN}net_sync_initial_done ${flagBtcDone} /home/admin/raspiblitz.info
|
||||
echo "EVENT --> btc_${CHAIN}net_sync_initial_done changed to ${flagBtcDone}"
|
||||
fi
|
||||
|
||||
@ -321,6 +371,12 @@ do
|
||||
/home/admin/config.scripts/lnd.backup.sh mainnet recoverymode off
|
||||
fi
|
||||
|
||||
# CLN if recovery mode was on - deactivate now
|
||||
if [ "${LN}" == "cl" ] && [ "${flagLNRecoveryMode}" == "1" ]; then
|
||||
/home/admin/_cache.sh set ln_cl_mainnet_recovery_mode 0
|
||||
/home/admin/config.scripts/cl.backup.sh mainnet recoverymode off
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
@ -331,7 +387,7 @@ do
|
||||
fi
|
||||
|
||||
####################################################
|
||||
# CHECK FOR End of Intial Blockhain & Lightning Sync
|
||||
# Check for end of Initial Blockhain & Lightning Sync
|
||||
# bitcoin mainnet only / special on dbcache size
|
||||
####################################################
|
||||
|
||||
@ -343,7 +399,7 @@ do
|
||||
# this flag signals that an initial blockchain sync/chatchup was happening
|
||||
flagExists=$(ls /mnt/hdd/bitcoin/blocks/selfsync.flag 2>/dev/null | grep -c "selfsync.flag")
|
||||
if [ ${flagExists} -eq 1 ]; then
|
||||
|
||||
|
||||
source <(/home/admin/_cache.sh get btc_default_sync_initialblockdownload)
|
||||
if [ "${btc_default_sync_initialblockdownload}" == "0" ]; then
|
||||
|
||||
@ -383,7 +439,7 @@ do
|
||||
# check every 30sec
|
||||
recheckBlitzTUI=$(($counter % 30))
|
||||
if [ "${touchscreen}" == "1" ] && [ ${recheckBlitzTUI} -eq 1 ]; then
|
||||
|
||||
|
||||
echo "BlitzTUI Monitoring Check"
|
||||
if [ -d "/var/cache/raspiblitz" ]; then
|
||||
latestHeartBeatLine=$(tail -n 300 /var/cache/raspiblitz/pi/blitz-tui.log | grep beat | tail -n 1)
|
||||
@ -405,7 +461,7 @@ do
|
||||
fi
|
||||
|
||||
###############################
|
||||
# SCB Monitoring
|
||||
# SCB Monitoring (LND)
|
||||
###############################
|
||||
|
||||
# check every 1min (only when lnd active)
|
||||
@ -434,11 +490,35 @@ do
|
||||
echo "--> Channel Backup File changed"
|
||||
|
||||
# make copy to sd card (as local basic backup)
|
||||
mkdir -p /home/admin/backups/scb/ 2>/dev/null
|
||||
mkdir -p ${localBackupDir} 2>/dev/null
|
||||
cp $scbPath $localBackupPath
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "OK channel.backup copied to '${localBackupPath}'"
|
||||
else
|
||||
logger -p daemon.err "_background.sh FAIL channel.backup copy to '${localBackupPath}'"
|
||||
echo "FAIL channel.backup copy to '${localBackupPath}'"
|
||||
fi
|
||||
|
||||
cp $scbPath $localTimestampedPath
|
||||
cp $scbPath /boot/channel.backup
|
||||
echo "OK channel.backup copied to '${localBackupPath}' and '${localTimestampedPath}' and '/boot/channel.backup'"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "OK channel.backup copied to '${localTimestampedPath}'"
|
||||
else
|
||||
logger -p daemon.err "_background.sh FAIL channel.backup copy to '${localTimestampedPath}'"
|
||||
echo "FAIL channel.backup copy to '${localTimestampedPath}'"
|
||||
fi
|
||||
|
||||
# copy to boot drive (for easy recovery)
|
||||
if [ "${raspi_bootdir}" != "" ]; then
|
||||
cp $scbPath ${raspi_bootdir}/channel.backup
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "OK channel.backup copied to '${raspi_bootdir}/channel.backup'"
|
||||
else
|
||||
logger -p daemon.err "_background.sh FAIL channel.backup copy to '${raspi_bootdir}/channel.backup'"
|
||||
echo "FAIL channel.backup copy to '${raspi_bootdir}/channel.backup'"
|
||||
fi
|
||||
else
|
||||
echo "No boot drive found - skip copy to boot"
|
||||
fi
|
||||
|
||||
# check if a additional local backup target is set
|
||||
# see ./config.scripts/blitz.backupdevice.sh
|
||||
@ -473,7 +553,7 @@ do
|
||||
# On target server add the public key of your RaspiBlitz to the authorized_keys for the user
|
||||
# https://www.linode.com/docs/security/authentication/use-public-key-authentication-with-ssh/
|
||||
if [ ${#scpBackupTarget} -gt 0 ]; then
|
||||
echo "--> Offsite-Backup SCP Server"
|
||||
echo "--> Offsite-Backup SFTP Server"
|
||||
if [ "${scpBackupOptions}" == "" ]; then
|
||||
scpBackupOptions="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
|
||||
fi
|
||||
@ -509,8 +589,115 @@ do
|
||||
fi
|
||||
fi
|
||||
|
||||
###################################
|
||||
# Emergency Backup Monitoring (CLN)
|
||||
###################################
|
||||
|
||||
# check every 1min for cln
|
||||
recheckER=0
|
||||
if [ "${lightning}" == "cl" ] || [ "${cl}" == "on" ]; then
|
||||
recheckER=$(($counter % 60))
|
||||
fi
|
||||
if [ ${recheckER} -eq 1 ]; then
|
||||
#echo "ER Monitoring ..."
|
||||
source ${configFile}
|
||||
source <(/home/admin/config.scripts/network.aliases.sh getvars cl ${chain}net)
|
||||
# check if emergency.recover exists
|
||||
erPath=/home/bitcoin/.lightning/${CLNETWORK}/emergency.recover
|
||||
erExists=$(ls $erPath 2>/dev/null | grep -c 'emergency.recover')
|
||||
if [ ${erExists} -eq 1 ]; then
|
||||
|
||||
# timestamp backup filename
|
||||
timestampedFileName=${netprefix}emergency-$(date "+%Y%m%d-%H%M%S").recover
|
||||
localBackupDir=/home/admin/backups/er
|
||||
localBackupPath=${localBackupDir}/emergency.recover
|
||||
localTimestampedPath=${localBackupDir}/${timestampedFileName}
|
||||
|
||||
#echo "Found Channel Backup File .. check if changed .."
|
||||
md5checksumORG=$(md5sum $erPath 2>/dev/null | head -n1 | cut -d " " -f1)
|
||||
md5checksumCPY=$(md5sum $localBackupPath 2>/dev/null | head -n1 | cut -d " " -f1)
|
||||
if [ "${md5checksumORG}" != "${md5checksumCPY}" ]; then
|
||||
echo "--> Channel Backup File changed"
|
||||
|
||||
# make copy to sd card (as local basic backup)
|
||||
mkdir -p /home/admin/backups/er/ 2>/dev/null
|
||||
cp $erPath $localBackupPath
|
||||
cp $erPath $localTimestampedPath
|
||||
cp $erPath ${raspi_bootdir}/${netprefix}emergency.recover
|
||||
echo "OK emergency.recover copied to '${localBackupPath}' and '${localTimestampedPath}' and '${raspi_bootdir}/${netprefix}emergency.recover'"
|
||||
|
||||
# check if a additional local backup target is set
|
||||
# see ./config.scripts/blitz.backupdevice.sh
|
||||
if [ "${localBackupDeviceUUID}" != "" ] && [ "${localBackupDeviceUUID}" != "off" ]; then
|
||||
|
||||
# check if device got mounted on "/mnt/backup" (gets mounted by _bootstrap.sh)
|
||||
backupDeviceExists=$(df | grep -c "/mnt/backup")
|
||||
if [ ${backupDeviceExists} -gt 0 ]; then
|
||||
|
||||
echo "--> Additional Local Backup Device"
|
||||
cp ${localBackupPath} /mnt/backup/
|
||||
cp ${localTimestampedPath} /mnt/backup/
|
||||
|
||||
# check results
|
||||
result=$?
|
||||
if [ ${result} -eq 0 ]; then
|
||||
echo "OK - Successful Copy to additional Backup Device"
|
||||
else
|
||||
echo "FAIL - Copy to additional Backup Device exited with ${result}"
|
||||
fi
|
||||
|
||||
else
|
||||
echo "FAIL - BackupDrive mount - check if device is connected & UUID is correct" >> $logFile
|
||||
fi
|
||||
fi
|
||||
|
||||
# check if a SCP backup target is set
|
||||
# parameter in raspiblitz.conf:
|
||||
# scpBackupTarget='[USER]@[SERVER]:[DIRPATH-WITHOUT-ENDING-/]'
|
||||
# optionally a custom option string for the scp command can be set with
|
||||
# scpBackupOptions='[YOUR-CUSTOM-OPTIONS]'
|
||||
# On target server add the public key of your RaspiBlitz to the authorized_keys for the user
|
||||
# https://www.linode.com/docs/security/authentication/use-public-key-authentication-with-ssh/
|
||||
if [ ${#scpBackupTarget} -gt 0 ]; then
|
||||
echo "--> Offsite-Backup SFTP Server"
|
||||
if [ "${scpBackupOptions}" == "" ]; then
|
||||
scpBackupOptions="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
|
||||
fi
|
||||
# its ok to ignore known host, because data is encrypted (worst case of MiM would be: no offsite channel backup)
|
||||
# but its more likely that without ignoring known host, script might not run thru and that way: no offsite channel backup
|
||||
scp ${scpBackupOptions} ${localBackupPath} ${scpBackupTarget}/
|
||||
scp ${scpBackupOptions} ${localTimestampedPath} ${scpBackupTarget}/
|
||||
result=$?
|
||||
if [ ${result} -eq 0 ]; then
|
||||
echo "OK - SCP Backup exited with 0"
|
||||
else
|
||||
echo "FAIL - SCP Backup exited with ${result}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# check if Nextcloud backups are enabled
|
||||
if [ $nextcloudBackupServer ] && [ $nextcloudBackupUser ] && [ $nextcloudBackupPassword ]; then
|
||||
echo "--> Offsite-Backup Nextcloud"
|
||||
source <(/home/admin/config.scripts/nextcloud.upload.sh upload ${localBackupPath})
|
||||
source <(/home/admin/config.scripts/nextcloud.upload.sh upload ${localTimestampedPath})
|
||||
if [ ${#err} -gt 0 ]; then
|
||||
echo "FAIL - ${err}"
|
||||
else
|
||||
echo "OK - ${upload}"
|
||||
fi
|
||||
fi
|
||||
|
||||
#else
|
||||
# echo "Channel Backup File not changed."
|
||||
fi
|
||||
#else
|
||||
# echo "No Channel Backup File .."
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
###############################
|
||||
# SUBSCRIPTION RENWES
|
||||
# SUBSCRIPTION RENEWS
|
||||
###############################
|
||||
|
||||
# check every 20min
|
||||
@ -530,6 +717,7 @@ do
|
||||
if [ ${recheckRAID} -eq 1 ]; then
|
||||
|
||||
# check if BTRTFS raid is active & scrub
|
||||
logger -p info "background.sh - RAID data check"
|
||||
source <(/home/admin/config.scripts/blitz.datadrive.sh status)
|
||||
if [ "${isBTRFS}" == "1" ] && [ "${isRaid}" == "1" ]; then
|
||||
echo "STARTING BTRFS RAID DATA CHECK ..."
|
||||
@ -570,4 +758,4 @@ do
|
||||
# sleep 1 sec
|
||||
sleep 1
|
||||
|
||||
done
|
||||
done
|
||||
|
@ -3,6 +3,8 @@
|
||||
# This script runs on every start called by boostrap.service
|
||||
# see logs with --> tail -n 100 /home/admin/raspiblitz.log
|
||||
|
||||
# NOTE: this boostrap script runs as root user (bootstrap.service) - so no sudo needed
|
||||
|
||||
################################
|
||||
# BASIC SETTINGS
|
||||
################################
|
||||
@ -27,22 +29,36 @@ infoFile="/home/admin/raspiblitz.info"
|
||||
# this key/value file contains the state during the setup process
|
||||
setupFile="/var/cache/raspiblitz/temp/raspiblitz.setup"
|
||||
|
||||
# Backup last log file if available
|
||||
cp ${logFile} /home/admin/raspiblitz.last.log 2>/dev/null
|
||||
|
||||
# Init boostrap log file
|
||||
echo "Writing logs to: ${logFile}"
|
||||
echo "" > $logFile
|
||||
sudo chmod 640 ${logFile}
|
||||
sudo chown root:sudo ${logFile}
|
||||
chmod 640 ${logFile}
|
||||
chown root:sudo ${logFile}
|
||||
echo "***********************************************" >> $logFile
|
||||
echo "Running RaspiBlitz Bootstrap ${codeVersion}" >> $logFile
|
||||
date >> $logFile
|
||||
echo "***********************************************" >> $logFile
|
||||
|
||||
# make sure SSH server is configured & running
|
||||
sudo /home/admin/config.scripts/blitz.ssh.sh checkrepair >> ${logFile}
|
||||
# list all running systemd services for future debug
|
||||
systemctl list-units --type=service --state=running >> $logFile
|
||||
|
||||
# check if the file /etc/ssh/sshd_init_keys exists --> initial boot of fresh sd card image
|
||||
if [ -f "/etc/ssh/sshd_init_keys" ]; then
|
||||
echo "# init SSH KEYS fresh for new user" >> $logFile
|
||||
/home/admin/config.scripts/blitz.ssh.sh init >> $logFile
|
||||
else
|
||||
echo "# make sure SSH server is configured & running" >> $logFile
|
||||
/home/admin/config.scripts/blitz.ssh.sh checkrepair >> $logFile
|
||||
fi
|
||||
|
||||
echo "## prepare raspiblitz temp" >> $logFile
|
||||
|
||||
# make sure /var/cache/raspiblitz/temp exists
|
||||
sudo mkdir -p /var/cache/raspiblitz/temp
|
||||
sudo chmod 777 /var/cache/raspiblitz/temp
|
||||
mkdir -p /var/cache/raspiblitz/temp
|
||||
chmod 777 /var/cache/raspiblitz/temp
|
||||
|
||||
################################
|
||||
# INIT raspiblitz.info
|
||||
@ -74,15 +90,16 @@ ln_cl_signet_sync_initial_done=0
|
||||
source ${infoFile} 2>/dev/null
|
||||
|
||||
# write fresh raspiblitz.info file
|
||||
echo "baseimage=${baseimage}" > $infoFile
|
||||
echo "state=starting" > $infoFile
|
||||
echo "message=starting" >> $infoFile
|
||||
echo "setupPhase=${setupPhase}" >> $infoFile
|
||||
echo "setupStep=${setupStep}" >> $infoFile
|
||||
echo "baseimage=${baseimage}" >> $infoFile
|
||||
echo "cpu=${cpu}" >> $infoFile
|
||||
echo "blitzapi=${blitzapi}" >> $infoFile
|
||||
echo "displayClass=${displayClass}" >> $infoFile
|
||||
echo "displayType=${displayType}" >> $infoFile
|
||||
echo "setupPhase=${setupPhase}" >> $infoFile
|
||||
echo "setupStep=${setupStep}" >> $infoFile
|
||||
echo "fsexpanded=${fsexpanded}" >> $infoFile
|
||||
echo "state=starting" >> $infoFile
|
||||
echo "btc_mainnet_sync_initial_done=${btc_mainnet_sync_initial_done}" >> $infoFile
|
||||
echo "btc_testnet_sync_initial_done=${btc_testnet_sync_initial_done}" >> $infoFile
|
||||
echo "btc_signet_sync_initial_done=${btc_signet_sync_initial_done}" >> $infoFile
|
||||
@ -93,15 +110,52 @@ echo "ln_cl_mainnet_sync_initial_done=${ln_cl_mainnet_sync_initial_done}" >> $in
|
||||
echo "ln_cl_testnet_sync_initial_done=${ln_cl_testnet_sync_initial_done}" >> $infoFile
|
||||
echo "ln_cl_signet_sync_initial_done=${ln_cl_signet_sync_initial_done}" >> $infoFile
|
||||
|
||||
sudo chmod 664 ${infoFile}
|
||||
chmod 664 ${infoFile}
|
||||
|
||||
# write content of raspiblitz.info to logs
|
||||
cat $infoFile >> $logFile
|
||||
|
||||
# determine correct raspberrypi boot drive path (that easy to access when sd card is insert into laptop)
|
||||
raspi_bootdir=""
|
||||
if [ -d /boot/firmware ]; then
|
||||
raspi_bootdir="/boot/firmware"
|
||||
elif [ -d /boot ]; then
|
||||
raspi_bootdir="/boot"
|
||||
fi
|
||||
echo "# raspi_bootdir(${raspi_bootdir})" >> $logFile
|
||||
|
||||
######################################
|
||||
# STOP file flag - for manual provision
|
||||
|
||||
# when a file 'stop' is on the sd card bootfs partition root - stop for manual provision
|
||||
flagExists=$(ls ${raspi_bootdir}/stop 2>/dev/null | grep -c 'stop')
|
||||
if [ "${flagExists}" == "1" ]; then
|
||||
# set state info
|
||||
/home/admin/_cache.sh set state "stop"
|
||||
/home/admin/_cache.sh set message "stopped for manual provision"
|
||||
systemctl stop background.service
|
||||
systemctl stop background.scan.service
|
||||
# log info
|
||||
echo "INFO: 'bootstrap stopped - run command release after manual provison to remove stop flag" >> ${logFile}
|
||||
exit 0
|
||||
fi
|
||||
|
||||
#########################
|
||||
# INIT RaspiBlitz Cache
|
||||
#########################
|
||||
|
||||
# make sure that redis service is enabled (disabled on fresh sd card image)
|
||||
redisEnabled=$(systemctl is-enabled redis-server | grep -c "enabled")
|
||||
echo "## redisEnabled(${redisEnabled})" >> $logFile
|
||||
if [ ${redisEnabled} -eq 0 ]; then
|
||||
echo "# make sure redis is running" >> $logFile
|
||||
sleep 6
|
||||
systemctl status redis-server >> $logFile
|
||||
systemctl enable redis-server >> $logFile
|
||||
systemctl start redis-server >> $logFile
|
||||
systemctl status redis-server >> $logFile
|
||||
fi
|
||||
|
||||
echo "## INIT RaspiBlitz Cache ... wait background.scan.service to finish first scan loop" >> $logFile
|
||||
systemscan_runtime=""
|
||||
while [ "${systemscan_runtime}" == "" ]
|
||||
@ -127,23 +181,59 @@ source ${configFile} 2>/dev/null
|
||||
######################################
|
||||
# CHECK SD CARD STATE
|
||||
|
||||
# when a file 'stop' is on the sd card boot partition - stop for manual provision
|
||||
flagExists=$(sudo ls /boot/stop | grep -c 'stop')
|
||||
if [ "${flagExists}" == "1" ]; then
|
||||
# remove flag
|
||||
sudo rm /boot/stop
|
||||
# set state info
|
||||
/home/admin/_cache.sh set state "stop"
|
||||
/home/admin/_cache.sh set message "stopped for manual provision"
|
||||
# log info
|
||||
echo "INFO: 'bootstrap stopped - run release after manual provison'" >> ${logFile}
|
||||
exit 0
|
||||
# wifi config by file on sd card
|
||||
wifiFileExists=$(ls ${raspi_bootdir}/wifi 2>/dev/null | grep -c 'wifi')
|
||||
wpaFileExists=$(ls ${raspi_bootdir}/wpa_supplicant.conf 2>/dev/null | grep -c 'wpa_supplicant.conf')
|
||||
if [ "${wifiFileExists}" == "1" ] || [ "${wpaFileExists}" == "1" ]; then
|
||||
|
||||
# set info
|
||||
echo "Setting Wifi by file on sd card ..." >> ${logFile}
|
||||
/home/admin/_cache.sh set message "setting wifi"
|
||||
|
||||
# File: wifi
|
||||
# get first line as string from wifi file (NAME OF WIFI)
|
||||
# get second line as string from wifi file (PASSWORD OF WIFI)
|
||||
if [ "${wifiFileExists}" == "1" ]; then
|
||||
echo "Getting data from file: ${raspi_bootdir}/wifi" >> ${logFile}
|
||||
ssid=$(sed -n '1p' ${raspi_bootdir}/wifi | tr -d '[:space:]')
|
||||
password=$(sed -n '2p' ${raspi_bootdir}/wifi | tr -d '[:space:]')
|
||||
fi
|
||||
|
||||
# File: wpa_supplicant.conf (legacy way to set wifi)
|
||||
# see: https://github.com/raspibolt/raspibolt/blob/a21788c0518618d17093e3f447f68a53e4efa6e7/raspibolt/raspibolt_20_pi.md#prepare-wifi
|
||||
if [ "${wpaFileExists}" == "1" ]; then
|
||||
echo "Getting data from file: ${raspi_bootdir}/wpa_supplicant.conf" >> ${logFile}
|
||||
ssid=$(grep ssid "${raspi_bootdir}/wpa_supplicant.conf" | awk -F'=' '{print $2}' | tr -d '"')
|
||||
password=$(grep psk "${raspi_bootdir}/wpa_supplicant.conf" | awk -F'=' '{print $2}' | tr -d '"')
|
||||
fi
|
||||
|
||||
# set wifi
|
||||
err=""
|
||||
echo "Setting Wifi SSID(${ssid}) Password(${password})" >> ${logFile}
|
||||
source <(/home/admin/config.scripts/internet.wifi.sh on ${ssid} ${password})
|
||||
if [ "${err}" != "" ]; then
|
||||
echo "Setting Wifi failed - edit or remove file ${raspi_bootdir}/wifi" >> ${logFile}
|
||||
echo "error(${err})" >> ${logFile}
|
||||
echo "Will shutdown in 1min ..." >> ${logFile}
|
||||
/home/admin/_cache.sh set state "errorWIFI"
|
||||
/home/admin/_cache.sh set message "${err}"
|
||||
sleep 60
|
||||
shutdown now
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# remove file
|
||||
echo "Setting Wifi worked - removing file" >> ${logFile}
|
||||
rm ${raspi_bootdir}/wifi 2>/dev/null
|
||||
rm ${raspi_bootdir}/wpa_supplicant.conf 2>/dev/null
|
||||
else
|
||||
echo "No Wifi config by file on sd card." >> ${logFile}
|
||||
fi
|
||||
|
||||
# when the provision did not ran thru without error (ask user for fresh sd card)
|
||||
provisionFlagExists=$(sudo ls /home/admin/provision.flag | grep -c 'provision.flag')
|
||||
provisionFlagExists=$(ls /home/admin/provision.flag | grep -c 'provision.flag')
|
||||
if [ "${provisionFlagExists}" == "1" ]; then
|
||||
sudo systemctl stop ${network}d 2>/dev/null
|
||||
systemctl stop ${network}d 2>/dev/null
|
||||
/home/admin/_cache.sh set state "inconsistentsystem"
|
||||
/home/admin/_cache.sh set message "provision did not ran thru"
|
||||
echo "FAIL: 'provision did not ran thru' - need fresh sd card!" >> ${logFile}
|
||||
@ -170,14 +260,15 @@ sleep 5
|
||||
# Emergency cleaning logs when over 1GB (to prevent SD card filling up)
|
||||
# see https://github.com/rootzoll/raspiblitz/issues/418#issuecomment-472180944
|
||||
echo "*** Checking Log Size ***"
|
||||
logsMegaByte=$(sudo du -c -m /var/log | grep "total" | awk '{print $1;}')
|
||||
logsMegaByte=$(du -c -m /var/log | grep "total" | awk '{print $1;}')
|
||||
if [ ${logsMegaByte} -gt 1000 ]; then
|
||||
echo "WARN # Logs /var/log in are bigger then 1GB" >> $logFile
|
||||
# dont delete directories - can make services crash
|
||||
sudo rm /var/log/*
|
||||
sudo service rsyslog restart
|
||||
rm /var/log/*
|
||||
service rsyslog restart
|
||||
/home/admin/_cache.sh set message "WARNING: /var/log/ >1GB"
|
||||
echo "WARN # Logs in /var/log in were bigger then 1GB and got emergency delete to prevent fillup." >> $logFile
|
||||
ls -la /var/log >> $logFile
|
||||
echo "If you see this in the logs please report to the GitHub issues, so LOG config needs to be optimized." >> $logFile
|
||||
sleep 10
|
||||
else
|
||||
@ -186,19 +277,19 @@ fi
|
||||
echo ""
|
||||
|
||||
# get the state of data drive
|
||||
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh status)
|
||||
source <(/home/admin/config.scripts/blitz.datadrive.sh status)
|
||||
|
||||
################################
|
||||
# WAIT LOOP: HDD CONNECTED
|
||||
################################
|
||||
|
||||
echo "Waiting for HDD/SSD ..." >> $logFile
|
||||
sudo ls -la /etc/ssh >> $logFile
|
||||
ls -la /etc/ssh >> $logFile
|
||||
until [ ${isMounted} -eq 1 ] || [ ${#hddCandidate} -gt 0 ]
|
||||
do
|
||||
|
||||
# recheck HDD/SSD
|
||||
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh status)
|
||||
source <(/home/admin/config.scripts/blitz.datadrive.sh status)
|
||||
echo "isMounted: $isMounted" >> $logFile
|
||||
echo "hddCandidate: $hddCandidate" >> $logFile
|
||||
|
||||
@ -229,33 +320,61 @@ systemInitReboot=0
|
||||
################################
|
||||
# FORCED SWITCH TO HDMI
|
||||
# if a file called 'hdmi' gets
|
||||
# placed onto the boot part of
|
||||
# placed onto the bootfs part of
|
||||
# the sd card - switch to hdmi
|
||||
################################
|
||||
|
||||
forceHDMIoutput=$(sudo ls /boot/hdmi* 2>/dev/null | grep -c hdmi)
|
||||
forceHDMIoutput=$(ls ${raspi_bootdir}/hdmi* 2>/dev/null | grep -c hdmi)
|
||||
if [ ${forceHDMIoutput} -eq 1 ]; then
|
||||
# delete that file (to prevent loop)
|
||||
sudo rm /boot/hdmi*
|
||||
rm ${raspi_bootdir}/hdmi*
|
||||
# switch to HDMI what will trigger reboot
|
||||
echo "HDMI switch found ... activating HDMI display output & reboot" >> $logFile
|
||||
sudo /home/admin/config.scripts/blitz.display.sh set-display hdmi >> $logFile
|
||||
/home/admin/config.scripts/blitz.display.sh set-display hdmi >> $logFile
|
||||
systemInitReboot=1
|
||||
/home/admin/_cache.sh set message "HDMI"
|
||||
else
|
||||
echo "No HDMI switch found. " >> $logFile
|
||||
fi
|
||||
|
||||
################################
|
||||
# GPT integrity check
|
||||
################################
|
||||
|
||||
check_and_fix_gpt() {
|
||||
local device=$1
|
||||
output=$(sudo gdisk -l $device 2>&1)
|
||||
if echo "$output" | grep -q "PMBR size mismatch"; then
|
||||
echo "GPT PMBR size mismatch detected on $device. Fixing..." >> $logFile
|
||||
sgdisk -e $device
|
||||
echo "Fixed GPT PMBR size mismatch on $device." >> $logFile
|
||||
elif echo "$output" | grep -q "The backup GPT table is not on the end of the device"; then
|
||||
echo "Backup GPT table is not at the end of $device. Fixing..." >> $logFile
|
||||
sgdisk -e $device
|
||||
echo "Fixed backup GPT table location on $device." >> $logFile
|
||||
else
|
||||
echo "No GPT issues detected on $device." >> $logFile
|
||||
fi
|
||||
}
|
||||
|
||||
# List all block devices
|
||||
devices=$(lsblk -dno NAME | grep -E '^sd|^nvme|^vd|^mmcblk')
|
||||
|
||||
# Check and fix each device
|
||||
for dev in $devices; do
|
||||
check_and_fix_gpt /dev/$dev
|
||||
done
|
||||
|
||||
################################
|
||||
# FS EXPAND
|
||||
# extend sd card to maximum capacity
|
||||
################################
|
||||
|
||||
source <(sudo /home/admin/config.scripts/blitz.bootdrive.sh status)
|
||||
source <(/home/admin/config.scripts/blitz.bootdrive.sh status)
|
||||
if [ "${needsExpansion}" == "1" ] && [ "${fsexpanded}" == "0" ]; then
|
||||
echo "FSEXPAND needed ... starting process" >> $logFile
|
||||
sudo /home/admin/config.scripts/blitz.bootdrive.sh status >> $logFile
|
||||
sudo /home/admin/config.scripts/blitz.bootdrive.sh fsexpand >> $logFile
|
||||
/home/admin/config.scripts/blitz.bootdrive.sh status >> $logFile
|
||||
/home/admin/config.scripts/blitz.bootdrive.sh fsexpand >> $logFile
|
||||
systemInitReboot=1
|
||||
/home/admin/_cache.sh set message "FSEXPAND"
|
||||
elif [ "${tooSmall}" == "1" ]; then
|
||||
@ -265,7 +384,7 @@ elif [ "${tooSmall}" == "1" ]; then
|
||||
/home/admin/_cache.sh set state "sdtoosmall"
|
||||
echo "System stopped. Please cut power." >> $logFile
|
||||
sleep 6000
|
||||
sudo shutdown -r now
|
||||
shutdown -r now
|
||||
slepp 100
|
||||
exit 1
|
||||
else
|
||||
@ -282,7 +401,7 @@ fi
|
||||
####################################
|
||||
|
||||
# check if there is a WIFI configuration to backup or restore
|
||||
if [ -f "/var/cache/raspiblitz/hdd-inspect/wpa_supplicant.conf" ]; then
|
||||
if [ -d "/var/cache/raspiblitz/hdd-inspect/wifi" ]; then
|
||||
echo "WIFI RESTORE from /var/cache/raspiblitz/hdd-inspect/wpa_supplicant.conf" >> $logFile
|
||||
/home/admin/config.scripts/internet.wifi.sh backup-restore >> $logFile
|
||||
else
|
||||
@ -309,10 +428,10 @@ fi
|
||||
# the sd card - delete old ssh data
|
||||
################################
|
||||
|
||||
sshReset=$(sudo ls /boot/ssh.reset* 2>/dev/null | grep -c reset)
|
||||
sshReset=$(ls ${raspi_bootdir}/ssh.reset* 2>/dev/null | grep -c reset)
|
||||
if [ ${sshReset} -eq 1 ]; then
|
||||
# delete that file (to prevent loop)
|
||||
rm /boot/ssh.reset* >> $logFile
|
||||
rm ${raspi_bootdir}/ssh.reset* >> $logFile
|
||||
# delete ssh certs
|
||||
echo "SSHRESET switch found ... stopping SSH and deleting old certs" >> $logFile
|
||||
/home/admin/config.scripts/blitz.ssh.sh renew >> $logFile
|
||||
@ -357,7 +476,7 @@ fi
|
||||
# UASP FIX
|
||||
################################
|
||||
/home/admin/_cache.sh set message "checking HDD"
|
||||
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh uasp-fix)
|
||||
source <(/home/admin/config.scripts/blitz.datadrive.sh uasp-fix)
|
||||
if [ "${neededReboot}" == "1" ]; then
|
||||
echo "UASP FIX applied ... reboot needed." >> $logFile
|
||||
systemInitReboot=1
|
||||
@ -370,10 +489,11 @@ fi
|
||||
# from actions above
|
||||
|
||||
if [ "${systemInitReboot}" == "1" ]; then
|
||||
sudo cp ${logFile} /home/admin/raspiblitz.systeminit.log
|
||||
echo "Reboot" >> $logFile
|
||||
cp ${logFile} /home/admin/raspiblitz.systeminit.log
|
||||
/home/admin/_cache.sh set state "reboot"
|
||||
sleep 8
|
||||
sudo shutdown -r now
|
||||
shutdown -r now
|
||||
sleep 100
|
||||
exit 0
|
||||
fi
|
||||
@ -386,6 +506,8 @@ gotLocalIP=0
|
||||
until [ ${gotLocalIP} -eq 1 ]
|
||||
do
|
||||
|
||||
echo "gotLocalIP(${gotLocalIP})" >> $logFile
|
||||
|
||||
# get latest network info directly
|
||||
source <(/home/admin/config.scripts/internet.sh status online)
|
||||
|
||||
@ -414,12 +536,41 @@ do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
################################
|
||||
# RaspberryPi 5 - Firmware Update (needs internet)
|
||||
# https://github.com/raspiblitz/raspiblitz/issues/4359
|
||||
################################
|
||||
|
||||
echo "checking Firmware" >> $logFile
|
||||
/home/admin/_cache.sh set message "checking Firmware"
|
||||
if [ "${baseimage}" == "raspios_arm64" ]; then
|
||||
echo "getting data" >> $logFile
|
||||
isRaspberryPi5=$(cat /proc/device-tree/model 2>/dev/null | grep -c "Raspberry Pi 5")
|
||||
firmwareBuildNumber=$(rpi-eeprom-update | grep "CURRENT" | cut -d "(" -f2 | sed 's/[^0-9]*//g')
|
||||
echo "checking Firmware: isRaspberryPi5(${isRaspberryPi5}) firmwareBuildNumber(${firmwareBuildNumber})" >> $logFile
|
||||
if [ ${isRaspberryPi5} -gt 0 ] && [ ${firmwareBuildNumber} -lt 1708097321 ]; then # Fri 16 Feb 15:28:41 UTC 2024 (1708097321)
|
||||
echo "updating Firmware" >> $logFile
|
||||
echo "RaspberryPi 5 detected with old firmware (${firmwareBuildNumber}) ... do update." >> $logFile
|
||||
apt-get update -y
|
||||
apt-get upgrade -y
|
||||
apt-get install -y rpi-eeprom
|
||||
rpi-eeprom-update -a
|
||||
echo "Restarting ..." >> $logFile
|
||||
sleep 3
|
||||
reboot
|
||||
else
|
||||
echo "RaspberryPi Firmware not in th need of update." >> $logFile
|
||||
fi
|
||||
else
|
||||
echo "Not a RaspberryPi .. no firmware update needed." >> $logFile
|
||||
fi
|
||||
|
||||
# write info for LCD
|
||||
/home/admin/_cache.sh set state "inspect-hdd"
|
||||
/home/admin/_cache.sh set message "please wait"
|
||||
|
||||
# get fresh info about data drive to continue
|
||||
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh status)
|
||||
source <(/home/admin/config.scripts/blitz.datadrive.sh status)
|
||||
|
||||
echo "isMounted: $isMounted" >> $logFile
|
||||
|
||||
@ -457,11 +608,11 @@ if [ ${isMounted} -eq 0 ]; then
|
||||
/home/admin/config.scripts/blitz.datadrive.sh status >> ${logFile}
|
||||
|
||||
# determine correct setup phase
|
||||
infoMessage="Please Login for Setup"
|
||||
infoMessage="Please start Setup"
|
||||
setupPhase="setup"
|
||||
|
||||
if [ "${hddGotMigrationData}" != "" ]; then
|
||||
infoMessage="Please Login for Migration"
|
||||
infoMessage="Please start Migration"
|
||||
setupPhase="migration"
|
||||
# check if lightning is outdated
|
||||
migrationMode="normal"
|
||||
@ -480,10 +631,10 @@ if [ ${isMounted} -eq 0 ]; then
|
||||
# TODO: improve version/update detection later
|
||||
isRecovery=$(echo "${hddRaspiVersion}" | grep -c "${codeVersion}")
|
||||
if [ "${isRecovery}" == "1" ]; then
|
||||
infoMessage="Please Login for Recovery"
|
||||
infoMessage="Please start Recovery"
|
||||
setupPhase="recovery"
|
||||
else
|
||||
infoMessage="Please Login for Update"
|
||||
infoMessage="Please start Update"
|
||||
setupPhase="update"
|
||||
fi
|
||||
|
||||
@ -505,11 +656,11 @@ if [ ${isMounted} -eq 0 ]; then
|
||||
do
|
||||
|
||||
# get fresh info about data drive (in case the hdd gets disconnected)
|
||||
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh status)
|
||||
source <(/home/admin/config.scripts/blitz.datadrive.sh status)
|
||||
if [ "${hddCandidate}" == "" ]; then
|
||||
/home/admin/config.scripts/blitz.error.sh _bootstrap.sh "lost-hdd" "Lost HDD connection .. triggering reboot." "happened during WAIT LOOP: USER SETUP/UPDATE/MIGRATION" ${logFile}
|
||||
sleep 8
|
||||
sudo shutdown -r now
|
||||
shutdown -r now
|
||||
sleep 100
|
||||
exit 0
|
||||
fi
|
||||
@ -520,7 +671,7 @@ if [ ${isMounted} -eq 0 ]; then
|
||||
if [ "${localip}" == "" ]; then
|
||||
sed -i "s/^state=.*/state=errorNetwork/g" ${infoFile}
|
||||
sleep 8
|
||||
sudo shutdown now
|
||||
shutdown now
|
||||
sleep 100
|
||||
exit 0
|
||||
fi
|
||||
@ -545,7 +696,7 @@ if [ ${isMounted} -eq 0 ]; then
|
||||
echo "the provision process was started but did not finish yet" > /home/admin/provision.flag
|
||||
|
||||
# get fresh data from setup file & data drive
|
||||
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh status)
|
||||
source <(/home/admin/config.scripts/blitz.datadrive.sh status)
|
||||
source ${setupFile}
|
||||
|
||||
# special setup tasks (triggered by api/webui thru setupfile)
|
||||
@ -556,7 +707,7 @@ if [ ${isMounted} -eq 0 ]; then
|
||||
|
||||
# check if there is a flag set on sd card boot section to format as btrfs (experimental)
|
||||
filesystem="ext4"
|
||||
flagBTRFS=$(sudo ls /boot/btrfs* 2>/dev/null | grep -c btrfs)
|
||||
flagBTRFS=$(ls ${raspi_bootdir}/btrfs* 2>/dev/null | grep -c btrfs)
|
||||
if [ "${flagBTRFS}" != "0" ]; then
|
||||
echo "Found BTRFS flag ---> formatting with experimental BTRFS filesystem" >> ${logFile}
|
||||
filesystem="btrfs"
|
||||
@ -565,8 +716,8 @@ if [ ${isMounted} -eq 0 ]; then
|
||||
# run formatting
|
||||
error=""
|
||||
/home/admin/_cache.sh set state "formathdd"
|
||||
echo "Running Format: (${filesystem}) (${hddCandidate})" >> ${logFile}
|
||||
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh format ${filesystem} ${hddCandidate})
|
||||
echo "Running Format: filesystem(${filesystem}) hddCandidate(${hddCandidate})" >> ${logFile}
|
||||
source <(/home/admin/config.scripts/blitz.datadrive.sh format ${filesystem} ${hddCandidate})
|
||||
if [ "${error}" != "" ]; then
|
||||
echo "FAIL ON FORMATTING THE DRIVE:" >> ${logFile}
|
||||
echo "${error}" >> ${logFile}
|
||||
@ -586,7 +737,7 @@ if [ ${isMounted} -eq 0 ]; then
|
||||
if [ "${hddGotMigrationData}" != "" ]; then
|
||||
clear
|
||||
echo "Migrating Blockchain of ${hddGotMigrationData}'" >> ${logFile}
|
||||
source <(sudo /home/admin/config.scripts/blitz.migration.sh migration-${hddGotMigrationData})
|
||||
source <(/home/admin/config.scripts/blitz.migration.sh migration-${hddGotMigrationData})
|
||||
if [ "${error}" != "0" ]; then
|
||||
echo "MIGRATION OF BLOCKHAIN FAILED: ${err}" >> ${logFile}
|
||||
echo "Format data disk on laptop & recover funds with fresh sd card using seed words + static channel backup." >> ${logFile}
|
||||
@ -598,8 +749,8 @@ if [ ${isMounted} -eq 0 ]; then
|
||||
|
||||
# delete everything but blockchain
|
||||
echo "Deleting everything on HDD/SSD while keeping blockchain ..." >> ${logFile}
|
||||
sudo /home/admin/config.scripts/blitz.datadrive.sh tempmount 1>/dev/null 2>/dev/null
|
||||
sudo /home/admin/config.scripts/blitz.datadrive.sh clean all -keepblockchain >> ${logFile}
|
||||
/home/admin/config.scripts/blitz.datadrive.sh tempmount 1>/dev/null 2>/dev/null
|
||||
/home/admin/config.scripts/blitz.datadrive.sh clean all -keepblockchain >> ${logFile}
|
||||
if [ "${error}" != "" ]; then
|
||||
echo "CLEANING HDD FAILED:" >> ${logFile}
|
||||
echo "${error}" >> ${logFile}
|
||||
@ -608,7 +759,7 @@ if [ ${isMounted} -eq 0 ]; then
|
||||
/home/admin/_cache.sh set message "Fail Cleaning HDD"
|
||||
exit 1
|
||||
fi
|
||||
sudo /home/admin/config.scripts/blitz.datadrive.sh unmount >> ${logFile}
|
||||
/home/admin/config.scripts/blitz.datadrive.sh unmount >> ${logFile}
|
||||
/home/admin/_cache.sh set setupPhase "setup"
|
||||
|
||||
sleep 2
|
||||
@ -633,10 +784,10 @@ if [ ${isMounted} -eq 0 ]; then
|
||||
# will first be created and in cache drive
|
||||
# and some lines below copied to hdd when mounted
|
||||
TEMPCONFIGFILE="/var/cache/raspiblitz/temp/raspiblitz.conf"
|
||||
sudo rm $TEMPCONFIGFILE 2>/dev/null
|
||||
sudo touch $TEMPCONFIGFILE
|
||||
sudo chown admin:admin $TEMPCONFIGFILE
|
||||
sudo chmod 777 $TEMPCONFIGFILE
|
||||
rm $TEMPCONFIGFILE 2>/dev/null
|
||||
touch $TEMPCONFIGFILE
|
||||
chown admin:admin $TEMPCONFIGFILE
|
||||
chmod 777 $TEMPCONFIGFILE
|
||||
echo "# RASPIBLITZ CONFIG FILE" > $TEMPCONFIGFILE
|
||||
echo "raspiBlitzVersion='${codeVersion}'" >> $TEMPCONFIGFILE
|
||||
echo "lcdrotate='1'" >> $TEMPCONFIGFILE
|
||||
@ -650,7 +801,7 @@ if [ ${isMounted} -eq 0 ]; then
|
||||
# make sure HDD is mounted (could be freshly formatted by user on last loop)
|
||||
source <(/home/admin/config.scripts/blitz.datadrive.sh status)
|
||||
echo "Temp mounting (2) data drive (hddFormat='${hddFormat}')" >> ${logFile}
|
||||
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh tempmount)
|
||||
source <(/home/admin/config.scripts/blitz.datadrive.sh tempmount)
|
||||
echo "Temp mounting (2) result: ${isMounted}" >> ${logFile}
|
||||
|
||||
# check that HDD was temp mounted
|
||||
@ -662,16 +813,16 @@ if [ ${isMounted} -eq 0 ]; then
|
||||
|
||||
# make sure all links between directories/drives are correct
|
||||
echo "Refreshing links between directories/drives .." >> ${logFile}
|
||||
sudo /home/admin/config.scripts/blitz.datadrive.sh link
|
||||
/home/admin/config.scripts/blitz.datadrive.sh link
|
||||
|
||||
# copy over the raspiblitz.conf created from setup to HDD
|
||||
configExists=$(ls /mnt/hdd/raspiblitz.conf 2>/dev/null | grep -c "raspiblitz.conf")
|
||||
if [ "${configExists}" != "1" ]; then
|
||||
sudo cp /var/cache/raspiblitz/temp/raspiblitz.conf ${configFile}
|
||||
cp /var/cache/raspiblitz/temp/raspiblitz.conf ${configFile}
|
||||
fi
|
||||
|
||||
# enable tor service
|
||||
sudo /home/admin/config.scripts/tor.install.sh enable >> ${logFile}
|
||||
/home/admin/config.scripts/tor.install.sh enable >> ${logFile}
|
||||
|
||||
# kick-off provision process
|
||||
/home/admin/_cache.sh set state "provision"
|
||||
@ -739,7 +890,31 @@ if [ ${isMounted} -eq 0 ]; then
|
||||
fi
|
||||
|
||||
echo "# setting PASSWORD A" >> ${logFile}
|
||||
sudo /home/admin/config.scripts/blitz.passwords.sh set a "${passwordA}" >> ${logFile}
|
||||
/home/admin/config.scripts/blitz.passwords.sh set a "${passwordA}" >> ${logFile}
|
||||
|
||||
# Bitcoin Mainnet
|
||||
if [ "${mainnet}" == "on" ] || [ "${chain}" == "main" ]; then
|
||||
echo "Provisioning ${network} Mainnet - run config script" >> ${logFile}
|
||||
/home/admin/config.scripts/bitcoin.install.sh on mainnet >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning ${network} Mainnet - not active" >> ${logFile}
|
||||
fi
|
||||
|
||||
# Bitcoin Testnet
|
||||
if [ "${testnet}" == "on" ]; then
|
||||
echo "Provisioning ${network} Testnet - run config script" >> ${logFile}
|
||||
/home/admin/config.scripts/bitcoin.install.sh on testnet >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning ${network} Testnet - not active" >> ${logFile}
|
||||
fi
|
||||
|
||||
# Bitcoin Signet
|
||||
if [ "${signet}" == "on" ]; then
|
||||
echo "Provisioning ${network} Signet - run config script" >> ${logFile}
|
||||
/home/admin/config.scripts/bitcoin.install.sh on signet >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning ${network} Signet - not active" >> ${logFile}
|
||||
fi
|
||||
|
||||
# if setup - run provision setup first
|
||||
if [ "${setupPhase}" == "setup" ]; then
|
||||
@ -748,7 +923,7 @@ if [ ${isMounted} -eq 0 ]; then
|
||||
/home/admin/_cache.sh set message "Provision Setup"
|
||||
/home/admin/_provision.setup.sh
|
||||
errorState=$?
|
||||
sudo cat /home/admin/raspiblitz.provision-setup.log
|
||||
cat /home/admin/raspiblitz.provision-setup.log
|
||||
if [ "$errorState" != "0" ]; then
|
||||
# only trigger an error message if the script hasnt itself triggered an error message already
|
||||
source <(/home/admin/_cache.sh get state)
|
||||
@ -872,8 +1047,10 @@ else
|
||||
################################
|
||||
# LND and Blockchain Errors will be still in systemd journals
|
||||
|
||||
# /mnt/hdd/bitcoin/debug.log
|
||||
rm /mnt/hdd/${network}/debug.log 2>/dev/null
|
||||
# limit debug.log to 10MB on start - see #3872
|
||||
if [ $(grep -c "shrinkdebugfile=" < /mnt/hdd/bitcoin/bitcoin.conf) -eq 0 ];then
|
||||
echo "shrinkdebugfile=1" | tee -a /mnt/hdd/bitcoin/bitcoin.conf
|
||||
fi
|
||||
# /mnt/hdd/lnd/logs/bitcoin/mainnet/lnd.log
|
||||
rm /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log 2>/dev/null
|
||||
# https://github.com/rootzoll/raspiblitz/issues/1700
|
||||
@ -898,6 +1075,20 @@ if [ ${configWifiExists} -eq 1 ]; then
|
||||
cp /etc/wpa_supplicant/wpa_supplicant.conf /mnt/hdd/app-data/wpa_supplicant.conf
|
||||
fi
|
||||
|
||||
# always copy the latest display setting (maybe just in raspiblitz.info) to raspiblitz.conf
|
||||
if [ "${displayClass}" != "" ]; then
|
||||
/home/admin/config.scripts/blitz.conf.sh set displayClass ${displayClass}
|
||||
fi
|
||||
if [ "${displayType}" != "" ]; then
|
||||
/home/admin/config.scripts/blitz.conf.sh set displayType ${displayType}
|
||||
fi
|
||||
|
||||
# correct blitzapi config value
|
||||
blitzApiRunning=$(ls /etc/systemd/system/blitzapi.service 2>/dev/null | grep -c "blitzapi.service")
|
||||
if [ "${blitzapi}" == "" ] && [ ${blitzApiRunning} -eq 1 ]; then
|
||||
/home/admin/config.scripts/blitz.conf.sh set blitzapi "on"
|
||||
fi
|
||||
|
||||
# make sure users have latest credentials (if lnd is on)
|
||||
if [ "${lightning}" == "lnd" ] || [ "${lnd}" == "on" ]; then
|
||||
echo "running LND users credentials update" >> $logFile
|
||||
@ -923,7 +1114,7 @@ fi
|
||||
# CLEAN HDD TEMP
|
||||
#####################################
|
||||
echo "CLEANING TEMP DRIVE/FOLDER" >> $logFile
|
||||
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh clean temp)
|
||||
source <(/home/admin/config.scripts/blitz.datadrive.sh clean temp)
|
||||
if [ ${#error} -gt 0 ]; then
|
||||
echo "FAIL: ${error}" >> $logFile
|
||||
else
|
||||
@ -946,8 +1137,9 @@ fi
|
||||
# FORCE UASP FLAG
|
||||
####################
|
||||
# if uasp.force flag was set on sd card - now move into raspiblitz.conf
|
||||
if [ -f "/boot/uasp.force" ]; then
|
||||
if [ -f "${raspi_bootdir}/uasp.force" ]; then
|
||||
/home/admin/config.scripts/blitz.conf.sh set forceUasp "on"
|
||||
rm ${raspi_bootdir}/uasp.force* >> $logFile
|
||||
echo "DONE forceUasp=on recorded in raspiblitz.conf" >> $logFile
|
||||
fi
|
||||
|
||||
@ -957,7 +1149,7 @@ fi
|
||||
|
||||
if [ -d "/mnt/hdd/app-data/subscriptions" ]; then
|
||||
echo "OK: subscription data directory exists"
|
||||
sudo chown admin:admin /mnt/hdd/app-data/subscriptions
|
||||
chown admin:admin /mnt/hdd/app-data/subscriptions
|
||||
else
|
||||
echo "CREATE: subscription data directory"
|
||||
mkdir /mnt/hdd/app-data/subscriptions
|
||||
@ -965,7 +1157,7 @@ else
|
||||
fi
|
||||
|
||||
# make sure that bitcoin service is active
|
||||
sudo systemctl enable ${network}d
|
||||
systemctl enable ${network}d
|
||||
|
||||
# make sure setup/provision is marked as done
|
||||
/home/admin/_cache.sh set setupPhase "done"
|
||||
@ -982,6 +1174,9 @@ if [ "${btc_default_sync_initialblockdownload}" == "1" ]; then
|
||||
/home/admin/_cache.sh focus btc_default_sync_progress 0
|
||||
fi
|
||||
|
||||
# backup wifi settings
|
||||
/home/admin/config.scripts/internet.wifi.sh backup-restore
|
||||
|
||||
# notify about (re)start if activated
|
||||
source <(/home/admin/_cache.sh get hostname)
|
||||
/home/admin/config.scripts/blitz.notify.sh send "RaspiBlitz '${hostname}' (re)started" >> $logFile
|
||||
|
@ -5,7 +5,7 @@
|
||||
# 2) KEY-VALUE STORE for system state infos (REDIS)
|
||||
|
||||
# SECURITY NOTE: The files on the RAMDISK can be set with unix file permissions and so restrict certain users access.
|
||||
# But all data stored in the KEY-VALUE STORE has to be asumed as system-wide public information.
|
||||
# But all data stored in the KEY-VALUE STORE has to be assumed as system-wide public information.
|
||||
|
||||
# command info
|
||||
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ "$1" = "-help" ]; then
|
||||
@ -14,28 +14,29 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ "$1" = "-help" ];
|
||||
echo "_cache.sh ramdisk [on|off]"
|
||||
echo "_cache.sh keyvalue [on|off]"
|
||||
echo
|
||||
echo "_cache.sh init [key] [value] (only sets value if not exists)"
|
||||
echo "_cache.sh set [key] [value] [?expire-seconds]"
|
||||
echo "_cache.sh get [key1] [?key2] [?key3] ..."
|
||||
echo
|
||||
echo
|
||||
echo "_cache.sh increment [key1]"
|
||||
echo
|
||||
echo "_cache.sh focus [key] [update-seconds] [?duration-seconds]"
|
||||
echo "# set in how many seconds value is marked to be rescanned"
|
||||
echo "# -1 = slowest default update cycle"
|
||||
echo "# -1 = slowest default update cycle"
|
||||
echo "# 0 = update on every cycle"
|
||||
echo "# set a 'duration-seconds' after defaults to -1 (optional)"
|
||||
echo
|
||||
echo
|
||||
echo "_cache.sh meta [key] [?default]"
|
||||
echo "# get single key with additional metadata:"
|
||||
echo "# updateseconds= see above"
|
||||
echo "# stillvalid=0/1 if value is still valid or outdated"
|
||||
echo "# lasttouch= last update timestamp in unix seconds"
|
||||
echo
|
||||
echo
|
||||
echo "_cache.sh valid [key1] [?key2] [?key3] ..."
|
||||
echo "# check multiple keys if all are still not outdated"
|
||||
echo "# use for example to check if a complex call needs"
|
||||
echo "# to be made that covers multiple single data points"
|
||||
echo
|
||||
echo
|
||||
echo "_cache.sh import [bash-keyvalue-file]"
|
||||
echo "# import a bash style key-value file into store"
|
||||
echo
|
||||
@ -46,7 +47,7 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ "$1" = "-help" ];
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# BACKGROUND: we need to build outdated meta info manually,
|
||||
# BACKGROUND: we need to build outdated meta info manually,
|
||||
# because there is nothing as "AGE" in redis: https://github.com/redis/redis/issues/1147
|
||||
# only feature that can be used uis the EXPIRE feature to determine if a value is still valid
|
||||
|
||||
@ -55,7 +56,7 @@ META_OUTDATED_SECONDS=":out"
|
||||
META_LASTTOUCH_TS=":ts"
|
||||
META_VALID_FLAG=":val"
|
||||
|
||||
# path of the raspiblitz.info file (persiting cache values)
|
||||
# path of the raspiblitz.info file (persisting cache values)
|
||||
infoFile="/home/admin/raspiblitz.info"
|
||||
|
||||
###################
|
||||
@ -110,16 +111,17 @@ elif [ "$1" = "keyvalue" ] && [ "$2" = "on" ]; then
|
||||
sudo apt install -y redis-server
|
||||
|
||||
# edit config: dont save to disk
|
||||
sudo sed -i "/^save .*/d" /etc/redis/redis.conf
|
||||
# echo "# edit config"
|
||||
sudo cp /etc/redis/redis.conf /etc/redis/redis.conf.backup
|
||||
sudo sed -i "s/^# save \"\"/save \"\"/g" /etc/redis/redis.conf
|
||||
sudo sed -i "s/^appendonly yes/appendonly no/g" /etc/redis/redis.conf
|
||||
sudo sed -i "s/^stop-writes-on-bgsave-error yes/stop-writes-on-bgsave-error no/g" /etc/redis/redis.conf
|
||||
|
||||
echo "# restart and remove db dump file"
|
||||
# restart with new config
|
||||
sudo systemctl restart redis-server
|
||||
|
||||
# clean old databases if exist
|
||||
if ! ischroot; then sudo systemctl restart redis-server; fi
|
||||
sudo rm /var/lib/redis/dump.rdb 2>/dev/null
|
||||
|
||||
# restart again this time there is no old data dump to load
|
||||
sudo systemctl restart redis-server
|
||||
if ! ischroot; then sudo systemctl restart redis-server; fi
|
||||
|
||||
# uninstall
|
||||
elif [ "$1" = "keyvalue" ] && [ "$2" = "off" ]; then
|
||||
@ -133,44 +135,67 @@ elif [ "$1" = "keyvalue" ] && [ "$2" = "off" ]; then
|
||||
###################
|
||||
|
||||
# set
|
||||
elif [ "$1" = "set" ]; then
|
||||
elif [ "$1" = "set" ] || [ "$1" = "init" ]; then
|
||||
|
||||
# get parameters
|
||||
keystr=$2
|
||||
valuestr=$3
|
||||
expire=$4
|
||||
|
||||
# check that key & value are given
|
||||
# check that key & value are provided
|
||||
if [ "${keystr}" == "" ]; then
|
||||
echo "# Fail: missing parameter"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# update certain values also in raspiblitz.info
|
||||
if [ "${keystr}" = "state" ]; then
|
||||
# change value in raspiblitz.info
|
||||
sudo sed -i "s/^state=.*/state='${valuestr}'/g" ${infoFile}
|
||||
fi
|
||||
if [ "${keystr}" = "message" ]; then
|
||||
# change value in raspiblitz.info
|
||||
sudo sed -i "s/^message=.*/message='${valuestr}'/g" ${infoFile}
|
||||
fi
|
||||
if [ "${keystr}" = "setupPhase" ]; then
|
||||
# change value in raspiblitz.info
|
||||
sudo sed -i "s/^setupPhase=.*/setupPhase='${valuestr}'/g" ${infoFile}
|
||||
fi
|
||||
if [ "${keystr}" = "setupStep" ]; then
|
||||
# change value in raspiblitz.info
|
||||
sudo sed -i "s/^setupStep=.*/setupStep='${valuestr}'/g" ${infoFile}
|
||||
fi
|
||||
|
||||
NX=""
|
||||
if [ "$1" = "init" ]; then
|
||||
NX="NX "
|
||||
fi
|
||||
|
||||
# filter from expire just numbers
|
||||
expire="${expire//[^0-9.]/}"
|
||||
|
||||
# add an expire flag if given
|
||||
additionalParams=""
|
||||
# add an expire flag if given
|
||||
if [ "${expire}" != "" ]; then
|
||||
additionalParams="EX ${expire}"
|
||||
fi
|
||||
|
||||
# set in redis key value cache
|
||||
redis-cli set ${keystr} "${valuestr}" ${additionalParams} 1>/dev/null
|
||||
redis-cli set ${NX} ${keystr} "${valuestr}" ${additionalParams} 1>/dev/null
|
||||
|
||||
# set in redis the timestamp
|
||||
timestamp=$(date +%s)
|
||||
redis-cli set ${keystr}${META_LASTTOUCH_TS} "${timestamp}" ${additionalParams} 1>/dev/null
|
||||
redis-cli set ${NX}${keystr}${META_LASTTOUCH_TS} "${timestamp}" ${additionalParams} 1>/dev/null
|
||||
#echo "# lasttouch(${timestamp})"
|
||||
|
||||
# check if the value has a outdate policy
|
||||
outdatesecs=$(redis-cli get ${keystr}${META_OUTDATED_SECONDS})
|
||||
if [ "${outdatesecs}" == "" ]; then
|
||||
outdatesecs="-1"
|
||||
fi
|
||||
fi
|
||||
#echo "# outdatesecs(${outdatesecs})"
|
||||
if [ "${outdatesecs}" != "-1" ]; then
|
||||
# set exipire valid flag (if its gone - value is considered as outdated)
|
||||
# set expire valid flag (if its gone - value is considered as outdated)
|
||||
redis-cli set ${keystr}${META_VALID_FLAG} "1" EX ${outdatesecs} 1>/dev/null
|
||||
fi
|
||||
|
||||
@ -186,7 +211,7 @@ elif [ "$1" = "get" ]; then
|
||||
position=0
|
||||
for keystr in $@
|
||||
do
|
||||
|
||||
|
||||
# skip first parameter
|
||||
((position++))
|
||||
if [ $position -eq 1 ]; then
|
||||
@ -243,7 +268,7 @@ elif [ "$1" = "export" ]; then
|
||||
# get parameter
|
||||
keyfilter="${2}*"
|
||||
|
||||
# go thru all keys by keyfilter
|
||||
# go through all keys by keyfilter
|
||||
keylist=$(redis-cli KEYS "${keyfilter}")
|
||||
readarray -t arr <<< "${keylist}"
|
||||
for key in "${arr[@]}";do
|
||||
@ -266,7 +291,7 @@ elif [ "$1" = "export" ]; then
|
||||
|
||||
##################################
|
||||
# COUNT
|
||||
# count value up
|
||||
# increment value
|
||||
##################################
|
||||
|
||||
# set
|
||||
@ -309,7 +334,7 @@ elif [ "$1" = "focus" ]; then
|
||||
for key in "${arr[@]}";do
|
||||
if [ "${key}" == "" ]; then
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
keyClean=$(echo $key | cut -d ":" -f1)
|
||||
value=$(redis-cli get "${key}")
|
||||
echo "${keyClean}=${value}"
|
||||
@ -324,7 +349,7 @@ elif [ "$1" = "focus" ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
# sanatize parameters (if not -1)
|
||||
# sanitize parameters (if not -1)
|
||||
outdatesecs="${outdatesecs//[^0-9.]/}"
|
||||
|
||||
# check that key & value are given
|
||||
@ -333,7 +358,7 @@ elif [ "$1" = "focus" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# add an expire flag if given
|
||||
# add an expire flag if given
|
||||
additionalParams=""
|
||||
if [ "${durationsecs//[^0-9.]/}" != "" ]; then
|
||||
additionalParams="EX ${durationsecs//[^0-9.]/}"
|
||||
@ -358,13 +383,13 @@ elif [ "$1" = "meta" ]; then
|
||||
keystr=$2
|
||||
default=$3
|
||||
|
||||
# check that key & value are given
|
||||
# check that key & value are provided
|
||||
if [ "${keystr}" == "" ]; then
|
||||
echo "# Fail: missing parameter"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# get redis basic value
|
||||
|
||||
# get redis basic value
|
||||
valuestr=$(redis-cli get ${keystr})
|
||||
echo "value=\"${valuestr}\""
|
||||
|
||||
@ -380,7 +405,7 @@ elif [ "$1" = "meta" ]; then
|
||||
# get META_OUTDATED_SECONDS
|
||||
outdatesecs=$(redis-cli get ${keystr}${META_OUTDATED_SECONDS})
|
||||
if [ "${outdatesecs}" == "" ]; then
|
||||
# default is -1 --> never outdate
|
||||
# default is -1 --> never outdate
|
||||
outdatesecs="-1"
|
||||
fi
|
||||
echo "outdatesecs=\"${outdatesecs}\""
|
||||
@ -406,7 +431,7 @@ elif [ "$1" = "valid" ]; then
|
||||
lasttouch_overall=""
|
||||
for keystr in $@
|
||||
do
|
||||
|
||||
|
||||
# skip first parameter from script - thats the action string
|
||||
((position++))
|
||||
if [ $position -eq 1 ]; then
|
||||
@ -436,7 +461,7 @@ elif [ "$1" = "valid" ]; then
|
||||
# get outdate police of value (outdated = not valid anymore)
|
||||
outdatesecs=$(redis-cli get ${keystr}${META_OUTDATED_SECONDS})
|
||||
#echo "# ${keystr}${META_OUTDATED_SECONDS}=\"${outdatesecs}\""
|
||||
|
||||
|
||||
# if outdate policy is default or -1 ==> never outdated
|
||||
if [ "${outdatesecs}" == "" ] || [ "${outdatesecs}" == "-1" ]; then
|
||||
continue
|
||||
@ -453,7 +478,7 @@ elif [ "$1" = "valid" ]; then
|
||||
|
||||
# so valid flag does not exists anymore
|
||||
# ==> this means value is outdated
|
||||
# break loop and
|
||||
# break loop and
|
||||
echo "stillvalid=\"0\""
|
||||
exit 0
|
||||
|
||||
|
@ -5,6 +5,19 @@ if [ -f /home/admin/_aliases ];then
|
||||
source /home/admin/_aliases
|
||||
fi
|
||||
|
||||
# confirm interrupting commands
|
||||
confirm=0
|
||||
function confirmMsg() {
|
||||
while true; do
|
||||
read -p "$(echo -e "Execute the blitz command '$1'? (y/n): ")" yn
|
||||
case $yn in
|
||||
[Yy]* ) confirm=1;break;;
|
||||
[Nn]* ) confirm=0;break;;
|
||||
* ) echo "Please answer yes or no.";;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
# SHORTCUT COMMANDS you can call as user 'admin' from terminal
|
||||
|
||||
# command: blitz
|
||||
@ -35,13 +48,18 @@ function blitzhelp() {
|
||||
echo " status informational Blitz status screen"
|
||||
echo " sourcemode copy blockchain source modus"
|
||||
echo " check check if Blitz configuration files are correct"
|
||||
echo " patch sync all scripts with latest from github and branch"
|
||||
echo " patch [all] sync all scripts with latest from github and branch"
|
||||
echo " patch code sync only blitz scripts with latest from github and branch"
|
||||
echo " patch api sync only Blitz-API with latest from github and branch"
|
||||
echo " patch web sync only Blitz-WebUI with latest from github and branch"
|
||||
echo " cache check on chache system state"
|
||||
echo " github jumping directly into the options to change branch/repo/pr"
|
||||
echo
|
||||
echo "Development with VM:"
|
||||
echo " sync sync all repos from shared folder"
|
||||
echo " sync code sync only main raspiblitz repo from shared folder"
|
||||
echo " sync api sync only blitz api repo from shared folder"
|
||||
echo
|
||||
echo "Power:"
|
||||
echo " restart restart the node"
|
||||
echo " off shutdown the node"
|
||||
@ -56,11 +74,6 @@ function blitzhelp() {
|
||||
echo " gettx retrieve transaction from mempool or blockchain and print as JSON"
|
||||
echo " watchtx retrieve transaction from mempool or blockchain until certain confirmation target"
|
||||
echo
|
||||
echo "LND:"
|
||||
echo " balance your satoshi balance"
|
||||
echo " channels your lightning channels"
|
||||
echo " fwdreport show forwarding report"
|
||||
echo
|
||||
echo "Users:"
|
||||
echo " bos Balance of Satoshis"
|
||||
echo " chantools ChanTools"
|
||||
@ -72,6 +85,18 @@ function blitzhelp() {
|
||||
echo "Extras:"
|
||||
echo " whitepaper download the whitepaper from the blockchain to /home/admin/bitcoin.pdf"
|
||||
echo " notifyme wrapper for blitz.notify.sh that will send a notification using the configured method and settings"
|
||||
echo " suez visualize channels (for the default ln implementation and chain when installed)"
|
||||
echo " lnproxy wrap invoices with lnproxy"
|
||||
echo
|
||||
echo "LND:"
|
||||
echo " lncli LND commandline interface (when installed)"
|
||||
echo " balance your satoshi balance"
|
||||
echo " channels your lightning channels"
|
||||
echo " fwdreport show forwarding report"
|
||||
echo " manage use the lndmanage bonus app"
|
||||
echo
|
||||
echo "CLN:"
|
||||
echo " lightning-cli Core Lightning commandline interface (when installed)"
|
||||
}
|
||||
|
||||
# command: raspiblitz
|
||||
@ -97,7 +122,11 @@ function repair() {
|
||||
|
||||
# command: restart
|
||||
function restart() {
|
||||
/home/admin/config.scripts/blitz.shutdown.sh reboot
|
||||
echo "Command to restart your RaspiBlitz"
|
||||
confirmMsg restart
|
||||
if [ $confirm -eq 1 ]; then
|
||||
sudo /home/admin/config.scripts/blitz.shutdown.sh reboot
|
||||
fi
|
||||
}
|
||||
|
||||
# command: sourcemode
|
||||
@ -112,11 +141,32 @@ function check() {
|
||||
|
||||
# command: release
|
||||
function release() {
|
||||
/home/admin/config.scripts/blitz.preparerelease.sh
|
||||
echo "Command to prepare your RaspiBlitz installation for sd card image:"
|
||||
echo "- delete logs"
|
||||
echo "- clean raspiblitz.info"
|
||||
echo "- delete SSH Pub keys"
|
||||
echo "- delete local DNS confs"
|
||||
echo "- delete old API conf"
|
||||
echo "- delete local WIFI conf"
|
||||
echo "- shutdown"
|
||||
confirmMsg release
|
||||
if [ $confirm -eq 1 ]; then
|
||||
/home/admin/config.scripts/blitz.preparerelease.sh
|
||||
fi
|
||||
}
|
||||
|
||||
# command: fatpack
|
||||
function fatpack() {
|
||||
echo "Command to be called only on a fresh stopped minimal build to re-pack installs."
|
||||
confirmMsg fatpack
|
||||
if [ $confirm -eq 1 ]; then
|
||||
sudo /home/admin/config.scripts/blitz.fatpack.sh
|
||||
fi
|
||||
}
|
||||
|
||||
# command: debug
|
||||
function debug() {
|
||||
clear
|
||||
echo "Printing debug logs. Be patient, this should take maximum 2 minutes .."
|
||||
sudo rm /var/cache/raspiblitz/debug.log 2>/dev/null
|
||||
/home/admin/config.scripts/blitz.debug.sh > /var/cache/raspiblitz/debug.log
|
||||
@ -127,7 +177,7 @@ function debug() {
|
||||
if [ "$1" = "-l" ]||[ "$1" = "--link" ]; then
|
||||
proxy="-X 5 -x localhost:9050"
|
||||
if [ "$2" = "-n" ]||[ "$2" = "--no-tor" ]; then proxy=""; fi
|
||||
cat /var/cache/raspiblitz/debug.log | nc ${proxy} termbin.com 9999 | sed "s/termbin.com/l.termbin.com/"
|
||||
cat /var/cache/raspiblitz/debug.log | nc ${proxy} termbin.com 9999
|
||||
else
|
||||
cat /var/cache/raspiblitz/debug.log
|
||||
fi
|
||||
@ -136,23 +186,31 @@ function debug() {
|
||||
# command: patch
|
||||
# syncs script with latest set github and branch
|
||||
function patch() {
|
||||
if [ "$1" == "" ]; then
|
||||
echo "Command to patch your RaspiBlitz from github"
|
||||
confirmMsg patch
|
||||
if [ $confirm -eq 1 ]; then
|
||||
patch all
|
||||
fi
|
||||
fi
|
||||
|
||||
cd /home/admin
|
||||
|
||||
if [ "$1" == "" ] || [ "$1" == "code" ]; then
|
||||
if [ "$1" == "all" ] || [ "$1" == "code" ]; then
|
||||
echo
|
||||
echo "#######################################################"
|
||||
echo "### UPDATE BLITZ --> SCRIPTS (code)"
|
||||
/home/admin/config.scripts/blitz.github.sh -run
|
||||
fi
|
||||
|
||||
if [ "$1" == "" ] || [ "$1" == "api" ]; then
|
||||
if [ "$1" == "all" ] || [ "$1" == "api" ]; then
|
||||
echo
|
||||
echo "#######################################################"
|
||||
echo "### UPDATE BLITZ --> API"
|
||||
sudo /home/admin/config.scripts/blitz.web.api.sh update-code
|
||||
fi
|
||||
|
||||
if [ "$1" == "" ] || [ "$1" == "web" ]; then
|
||||
if [ "$1" == "all" ] || [ "$1" == "web" ]; then
|
||||
echo
|
||||
echo "#######################################################"
|
||||
echo "### UPDATE BLITZ --> WEBUI"
|
||||
@ -162,9 +220,20 @@ function patch() {
|
||||
echo
|
||||
}
|
||||
|
||||
# command: sync
|
||||
# sync VM with shared folder
|
||||
function sync() {
|
||||
sudo /home/admin/config.scripts/blitz.vm.sh sync ${1}
|
||||
echo
|
||||
}
|
||||
|
||||
# command: off
|
||||
function off() {
|
||||
/home/admin/config.scripts/blitz.shutdown.sh
|
||||
echo "Command to power off your RaspiBlitz"
|
||||
confirmMsg off
|
||||
if [ $confirm -eq 1 ]; then
|
||||
sudo /home/admin/config.scripts/blitz.shutdown.sh
|
||||
fi
|
||||
}
|
||||
|
||||
# command: github
|
||||
@ -176,23 +245,35 @@ function github() {
|
||||
|
||||
# command: hdmi
|
||||
function hdmi() {
|
||||
echo "# SWITCHING VIDEO OUTPUT TO --> HDMI"
|
||||
sudo /home/admin/config.scripts/blitz.display.sh set-display hdmi
|
||||
restart
|
||||
echo "Command to switch video output of your RaspiBlitz to hdmi"
|
||||
confirmMsg hdmi
|
||||
if [ $confirm -eq 1 ]; then
|
||||
echo "# SWITCHING VIDEO OUTPUT TO --> HDMI"
|
||||
sudo /home/admin/config.scripts/blitz.display.sh set-display hdmi
|
||||
restart
|
||||
fi
|
||||
}
|
||||
|
||||
# command: lcd
|
||||
function lcd() {
|
||||
echo "# SWITCHING VIDEO OUTPUT TO --> LCD"
|
||||
sudo /home/admin/config.scripts/blitz.display.sh set-display lcd
|
||||
restart
|
||||
echo "Command to switch video output of your RaspiBlitz to lcd"
|
||||
confirmMsg lcd
|
||||
if [ $confirm -eq 1 ]; then
|
||||
echo "# SWITCHING VIDEO OUTPUT TO --> LCD"
|
||||
sudo /home/admin/config.scripts/blitz.display.sh set-display lcd
|
||||
restart
|
||||
fi
|
||||
}
|
||||
|
||||
# command: headless
|
||||
function headless() {
|
||||
echo "# SWITCHING VIDEO OUTPUT TO --> HEADLESS"
|
||||
sudo /home/admin/config.scripts/blitz.display.sh set-display headless
|
||||
restart
|
||||
echo "Command to switch off any video output of your RaspiBlitz (ssh only)"
|
||||
confirmMsg headless
|
||||
if [ $confirm -eq 1 ]; then
|
||||
echo "# SWITCHING VIDEO OUTPUT TO --> HEADLESS"
|
||||
sudo /home/admin/config.scripts/blitz.display.sh set-display headless
|
||||
restart
|
||||
fi
|
||||
}
|
||||
|
||||
# command: cache
|
||||
@ -276,8 +357,8 @@ function bos() {
|
||||
# switch to the pyblock user for PyBLOCK
|
||||
function pyblock() {
|
||||
if [ $(grep -c "pyblock=on" < /mnt/hdd/raspiblitz.conf) -eq 1 ]; then
|
||||
cd /home/pyblock
|
||||
sudo -u pyblock /home/pyblock/.local/bin/pyblock
|
||||
cd /home/pyblock/pyblock
|
||||
sudo -u pyblock poetry run python -m pybitblock.console
|
||||
else
|
||||
echo "PyBlock is not installed - to install run:"
|
||||
echo "/home/admin/config.scripts/bonus.pyblock.sh on"
|
||||
@ -312,6 +393,21 @@ function jm() {
|
||||
fi
|
||||
}
|
||||
|
||||
# command: manage
|
||||
# switch to lndmanage env
|
||||
function manage() {
|
||||
if [ $(cat /mnt/hdd/raspiblitz.conf 2>/dev/null | grep -c "lndmanage=on") -eq 1 ]; then
|
||||
cd /home/admin/lndmanage
|
||||
source venv/bin/activate
|
||||
echo "NOTICE: Needs at least one active channel to run without error."
|
||||
echo "to exit (venv) enter ---> deactivate"
|
||||
lndmanage
|
||||
else
|
||||
echo "lndmanage not installed - to install run:"
|
||||
echo "sudo /home/admin/config.scripts/bonus.lndmanage.sh on"
|
||||
fi
|
||||
}
|
||||
|
||||
# command: ckbunker
|
||||
# switch to the ckbunker user
|
||||
function ckbunker() {
|
||||
@ -452,3 +548,58 @@ function bm() {
|
||||
echo "sudo /home/admin/config.scripts/bonus.bitcoinminds.sh on"
|
||||
fi
|
||||
}
|
||||
|
||||
# command: lnproxy
|
||||
function lnproxy() {
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
if [ $# -gt 0 ]; then
|
||||
invoice=$1
|
||||
else
|
||||
echo "Paste the invoice to be wrapped and press enter:"
|
||||
read -r invoice
|
||||
fi
|
||||
if systemctl is-active --quiet tor@default; then
|
||||
if [ -z "${lnproxy_override_tor}" ]; then
|
||||
lnproxy_override_tor="rdq6tvulanl7aqtupmoboyk2z3suzkdwurejwyjyjf4itr3zhxrm2lad.onion/api"
|
||||
fi
|
||||
wrapped=$(torsocks curl -sS http://${lnproxy_override_tor}/${invoice})
|
||||
echo
|
||||
echo "Requesting a wrapped invoice from ${lnproxy_override_tor}"
|
||||
else
|
||||
if [ -z "${lnproxy_override_clearnet}" ]; then
|
||||
lnproxy_override_clearnet="lnproxy.org/api"
|
||||
fi
|
||||
wrapped=$(curl -sS https://${lnproxy_override_clearnet}/${invoice})
|
||||
echo
|
||||
echo "Requesting a wrapped invoice from ${lnproxy_override_clearnet}"
|
||||
fi
|
||||
echo
|
||||
/home/admin/config.scripts/blitz.check-invoice-wrap.py "$1" "$wrapped"
|
||||
echo
|
||||
echo $wrapped
|
||||
}
|
||||
|
||||
# command: suez
|
||||
function suez() {
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
if [ ${lightning} = 'cl' ] || [ ${lightning} = 'lnd' ]; then
|
||||
if [ ! -f /home/bitcoin/suez/suez ];then
|
||||
/home/admin/config.scripts/bonus.suez.sh on
|
||||
fi
|
||||
source <(/home/admin/config.scripts/network.aliases.sh getvars ${lightning} ${chain}net)
|
||||
cd /home/bitcoin/suez || exit 1
|
||||
clear
|
||||
echo "# Showing the channels of ${lightning} ${chain}net - consider reducing the font size (press CTRL- or CMD-)"
|
||||
if [ ${lightning} = cl ]; then
|
||||
sudo -u bitcoin poetry run /home/bitcoin/suez/suez \
|
||||
--client=c-lightning --client-args=--conf=${CLCONF}
|
||||
elif [ ${lightning} = lnd ]; then
|
||||
sudo -u bitcoin poetry run /home/bitcoin/suez/suez \
|
||||
--client-args=-n=${CHAIN} \
|
||||
--client-args=--rpcserver=localhost:1${L2rpcportmod}009
|
||||
fi
|
||||
cd
|
||||
else
|
||||
echo "# Lightning is ${lightning}"
|
||||
fi
|
||||
}
|
||||
|
@ -55,6 +55,8 @@ fi
|
||||
# make sure for the rest of the setup info is set correctly
|
||||
/home/admin/config.scripts/blitz.conf.sh set network "bitcoin"
|
||||
/home/admin/config.scripts/blitz.conf.sh set chain "main"
|
||||
echo "Provisioning ${network} Mainnet - run config script" >> ${logFile}
|
||||
/home/admin/config.scripts/bitcoin.install.sh on mainnet >> ${logFile} 2>&1
|
||||
|
||||
# set Password B
|
||||
echo "## SETTING PASSWORD B" >> ${logFile}
|
||||
|
@ -39,6 +39,11 @@ if [ "${confExists}" != "1" ]; then
|
||||
exit 6
|
||||
fi
|
||||
|
||||
# make sure raspiblitz.conf has an blitzapi entry when setup thru fatpack image (blitzapi=on in raspiblitz.info)
|
||||
if [ "${blitzapi}" == "on" ]; then
|
||||
/home/admin/config.scripts/blitz.conf.sh set blitzapi on >> ${logFile}
|
||||
fi
|
||||
|
||||
###################################
|
||||
# Preserve SSH keys
|
||||
# just copy dont link anymore
|
||||
@ -93,8 +98,12 @@ if [ "${network}" == "bitcoin" ]; then
|
||||
kbSizeRAM=$(cat /proc/meminfo | grep "MemTotal" | sed 's/[^0-9]*//g')
|
||||
echo "kbSizeRAM(${kbSizeRAM})" >> ${logFile}
|
||||
echo "dont forget to reduce dbcache once IBD is done" > "/mnt/hdd/${network}/blocks/selfsync.flag"
|
||||
# RP4 8GB
|
||||
if [ ${kbSizeRAM} -gt 7500000 ]; then
|
||||
echo "Detected RAM >=8GB --> optimizing ${network}.conf" >> ${logFile}
|
||||
sed -i "s/^dbcache=.*/dbcache=4096/g" /mnt/hdd/${network}/${network}.conf
|
||||
# RP4 4GB
|
||||
if [ ${kbSizeRAM} -gt 3500000 ]; then
|
||||
elif [ ${kbSizeRAM} -gt 3500000 ]; then
|
||||
echo "Detected RAM >=4GB --> optimizing ${network}.conf" >> ${logFile}
|
||||
sed -i "s/^dbcache=.*/dbcache=2560/g" /mnt/hdd/${network}/${network}.conf
|
||||
# RP4 2GB
|
||||
@ -113,7 +122,7 @@ echo ""
|
||||
echo "*** Start ${network} (SETUP) ***" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "Blockchain Testrun"
|
||||
echo "- This can take a while .." >> ${logFile}
|
||||
cp /home/admin/assets/${network}d.service /etc/systemd/system/${network}d.service
|
||||
systemctl daemon-reload >> ${logFile}
|
||||
systemctl enable ${network}d.service
|
||||
systemctl start ${network}d.service
|
||||
|
||||
@ -134,7 +143,6 @@ do
|
||||
done
|
||||
echo "OK ${network} startup successful " >> ${logFile}
|
||||
|
||||
|
||||
###################################
|
||||
# Prepare Lightning
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
@ -259,7 +267,6 @@ if [ "${lightning}" == "lnd" ]; then
|
||||
|
||||
echo "WALLET --> SEED" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "LND Wallet (SEED)"
|
||||
if ! pip list | grep grpc; then sudo -H python3 -m pip install grpcio==1.38.1; fi
|
||||
source <(/home/admin/config.scripts/lnd.initwallet.py seed mainnet "${passwordC}" "${seedWords}" "${seedPassword}")
|
||||
if [ "${err}" != "" ]; then
|
||||
/home/admin/config.scripts/blitz.error.sh _provision.setup.sh "lnd-wallet-seed" "lnd.initwallet.py seed returned error" "/home/admin/config.scripts/lnd.initwallet.py seed mainnet ... --> ${err} + ${errMore}" ${logFile}
|
||||
@ -276,7 +283,6 @@ if [ "${lightning}" == "lnd" ]; then
|
||||
|
||||
echo "# WALLET --> NEW" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "LND Wallet (NEW)"
|
||||
if ! pip list | grep grpc; then sudo -H python3 -m pip install grpcio==1.38.1; fi
|
||||
source <(/home/admin/config.scripts/lnd.initwallet.py new mainnet "${passwordC}")
|
||||
if [ "${err}" != "" ]; then
|
||||
/home/admin/config.scripts/blitz.error.sh _provision.setup.sh "lnd-wallet-new" "lnd.initwallet.py new returned error" "/home/admin/config.scripts/lnd.initwallet.py new mainnet ... --> ${err} + ${errMore}" ${logFile}
|
||||
@ -343,10 +349,6 @@ if [ "${lightning}" == "cl" ]; then
|
||||
/home/admin/_cache.sh set message "Core Lightning Setup"
|
||||
/home/admin/config.scripts/cl.install.sh on mainnet >> ${logFile}
|
||||
|
||||
echo "# switch cln-grpc on" >> ${logFile}
|
||||
/home/admin/config.scripts/cl-plugin.cln-grpc.sh install >> ${logFile}
|
||||
/home/admin/config.scripts/cl-plugin.cln-grpc.sh on >> ${logFile}
|
||||
|
||||
# OLD WALLET FROM CLIGHTNING RESCUE
|
||||
if [ "${clrescue}" != "" ]; then
|
||||
|
||||
|
@ -46,7 +46,13 @@ fi
|
||||
# load old or init raspiblitz config
|
||||
source ${configFile}
|
||||
|
||||
# check if config files contains basic: hostname
|
||||
# if hostname missing - set default
|
||||
if [ ${#hostname} -eq 0 ]; then
|
||||
/home/admin/config.scripts/blitz.conf.sh set hostname "raspiblitz"
|
||||
source ${configFile}
|
||||
fi
|
||||
|
||||
# re-check if config files contains hostname value
|
||||
if [ ${#hostname} -eq 0 ]; then
|
||||
/home/admin/config.scripts/blitz.error.sh _provision.update.sh "missing-hostname" "${setupFile} or ${configFile} contains no hostname" "" ${logFile}
|
||||
exit 1
|
||||
@ -146,6 +152,9 @@ else
|
||||
echo "WARN: /mnt/hdd/bitcoin/bitcoin.conf not found" >> ${logFile}
|
||||
fi
|
||||
|
||||
# delete old Tor v1 addresses from config - see: https://github.com/rootzoll/raspiblitz/issues/3659
|
||||
sed -i -E "/^addnode=[a-z0-9]{8,18}\.onion/d" /mnt/hdd/${network}/${network}.conf 2>/dev/null
|
||||
|
||||
echo "Version Code: ${codeVersion}" >> ${logFile}
|
||||
echo "Version Data: ${raspiBlitzVersion}" >> ${logFile}
|
||||
|
||||
@ -164,24 +173,16 @@ echo "*** Start ${network} (UPDATE) ***" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "Blockchain Testrun"
|
||||
echo "- This can take a while .." >> ${logFile}
|
||||
chown -R bitcoin:bitcoin /mnt/hdd/${network} >>${logFile} 2>&1
|
||||
cp /home/admin/assets/${network}d.service /etc/systemd/system/${network}d.service
|
||||
systemctl daemon-reload >> ${logFile}
|
||||
systemctl enable ${network}d.service >> ${logFile}
|
||||
systemctl start ${network}d.service >> ${logFile}
|
||||
|
||||
# INSTALL LND on Upadte/Recovery
|
||||
# INSTALL LND on Update/Recovery
|
||||
if [ "${lightning}" == "lnd" ] || [ "${lnd}" == "on" ]; then
|
||||
|
||||
# prepare lnd service
|
||||
cp /home/admin/assets/lnd.service /etc/systemd/system/lnd.service >> ${logFile} 2>&1
|
||||
|
||||
# convert old keysend by lndExtraParameter to raspiblitz.conf setting (will be enforced by lnd.check.sh prestart) since 1.7.1
|
||||
if [ "${lndExtraParameter}" == "--accept-keysend" ]; then
|
||||
echo "# MIGRATION KEYSEND from lndExtraParameter --> raspiblitz.conf" >> ${logFile}
|
||||
/home/admin/config.scripts/blitz.conf.sh set lndKeysend "on"
|
||||
/home/admin/config.scripts/blitz.conf.sh delete lndExtraParameter
|
||||
fi
|
||||
|
||||
# if old lnd.conf exists ...
|
||||
configExists=$(sudo ls /mnt/hdd/lnd/lnd.conf | grep -c '.conf')
|
||||
if [ ${configExists} -eq 1 ]; then
|
||||
|
@ -35,6 +35,6 @@ sudo rm /var/cache/raspiblitz/temp/raspiblitz.setup
|
||||
sudo cp /home/admin/raspiblitz.log /home/admin/raspiblitz.setup.log
|
||||
sudo chmod 640 /home/admin/raspiblitz.setup.log
|
||||
sudo chown root:sudo /home/admin/raspiblitz.setup.log
|
||||
timeout 120 /home/admin/config.scripts/blitz.shutdown.sh reboot finalsetup
|
||||
timeout 120 sudo /home/admin/config.scripts/blitz.shutdown.sh reboot finalsetup
|
||||
# if system has not rebooted yet - force reboot directly
|
||||
sudo shutdown -r now
|
||||
sudo shutdown -r now
|
||||
|
@ -1,14 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
# check if run by root user
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
echo "error='run as root'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# This script gets called from a fresh SD card
|
||||
# starting up that has an config file on HDD
|
||||
# from old RaspiBlitz or manufacturer to
|
||||
# starting up that has a config file on HDD
|
||||
# from old RaspiBlitz or manufacturer
|
||||
# to install and config services
|
||||
|
||||
# LOGFILE - store debug logs of bootstrap
|
||||
@ -40,6 +40,7 @@ if [ ${configExists} -eq 0 ]; then
|
||||
fi
|
||||
|
||||
# import config values
|
||||
source ${infoFile}
|
||||
source ${configFile}
|
||||
|
||||
##########################
|
||||
@ -52,12 +53,6 @@ echo "### BASIC SYSTEM SETTINGS ###" >> ${logFile}
|
||||
echo "# Make sure the user bitcoin is in the debian-tor group"
|
||||
usermod -a -G debian-tor bitcoin
|
||||
|
||||
echo "# Optimizing log files: rotate daily, keep 1 week & compress old days " >> ${logFile}
|
||||
sed -i "s/^weekly/daily/g" /etc/logrotate.conf >> ${logFile} 2>&1
|
||||
sed -i "s/^rotate 4/rotate 7/g" /etc/logrotate.conf >> ${logFile} 2>&1
|
||||
sed -i "s/^#compress/compress/g" /etc/logrotate.conf >> ${logFile} 2>&1
|
||||
systemctl restart logrotate
|
||||
|
||||
# make sure to have bitcoin core >=22 is backwards comp
|
||||
# see https://github.com/rootzoll/raspiblitz/issues/2546
|
||||
sed -i '/^deprecatedrpc=.*/d' /mnt/hdd/bitcoin/bitcoin.conf 2>/dev/null
|
||||
@ -66,6 +61,9 @@ echo "deprecatedrpc=addresses" >> /mnt/hdd/bitcoin/bitcoin.conf 2>/dev/null
|
||||
# backup SSH PubKeys
|
||||
/home/admin/config.scripts/blitz.ssh.sh backup
|
||||
|
||||
# set timezone
|
||||
/home/admin/config.scripts/blitz.time.sh set-by-config >> ${logFile}
|
||||
|
||||
# optimize mempool if RAM >1GB
|
||||
kbSizeRAM=$(cat /proc/meminfo | grep "MemTotal" | sed 's/[^0-9]*//g')
|
||||
if [ ${kbSizeRAM} -gt 1500000 ]; then
|
||||
@ -78,25 +76,23 @@ if [ ${kbSizeRAM} -gt 3500000 ]; then
|
||||
fi
|
||||
|
||||
# zram on for all devices
|
||||
/home/admin/config.scripts/blitz.zram.sh on
|
||||
/home/admin/config.scripts/blitz.zram.sh on >> ${logFile}
|
||||
|
||||
# link and copy HDD content into new OS on sd card
|
||||
echo "Copy HDD content for user admin" >> ${logFile}
|
||||
mkdir /home/admin/.${network} >> ${logFile} 2>&1
|
||||
mkdir /home/admin/.${network} >> ${logFile}
|
||||
cp /mnt/hdd/${network}/${network}.conf /home/admin/.${network}/${network}.conf >> ${logFile} 2>&1
|
||||
mkdir /home/admin/.lnd >> ${logFile} 2>&1
|
||||
cp /mnt/hdd/lnd/lnd.conf /home/admin/.lnd/lnd.conf >> ${logFile} 2>&1
|
||||
cp /mnt/hdd/lnd/tls.cert /home/admin/.lnd/tls.cert >> ${logFile} 2>&1
|
||||
mkdir /home/admin/.lnd/data >> ${logFile} 2>&1
|
||||
mkdir /home/admin/.lnd >> ${logFile}
|
||||
cp /mnt/hdd/lnd/lnd.conf /home/admin/.lnd/lnd.conf >> ${logFile}
|
||||
cp /mnt/hdd/lnd/tls.cert /home/admin/.lnd/tls.cert >> ${logFile}
|
||||
mkdir /home/admin/.lnd/data >> ${logFile}
|
||||
cp -r /mnt/hdd/lnd/data/chain /home/admin/.lnd/data/chain >> ${logFile} 2>&1
|
||||
chown -R admin:admin /home/admin/.${network} >> ${logFile} 2>&1
|
||||
chown -R admin:admin /home/admin/.lnd >> ${logFile} 2>&1
|
||||
cp /home/admin/assets/${network}d.service /etc/systemd/system/${network}d.service >> ${logFile} 2>&1
|
||||
cp /home/admin/assets/tmux.conf.local /mnt/hdd/.tmux.conf.local >> ${logFile} 2>&1
|
||||
chown admin:admin /mnt/hdd/.tmux.conf.local >> ${logFile} 2>&1
|
||||
ln -s -f /mnt/hdd/.tmux.conf.local /home/admin/.tmux.conf.local >> ${logFile} 2>&1
|
||||
|
||||
|
||||
# PREPARE LND (if activated)
|
||||
if [ "${lightning}" == "lnd" ] || [ "${lnd}" == "on" ]; then
|
||||
# backup LND TLS certs
|
||||
@ -164,10 +160,15 @@ echo "allow: local web admin HTTPS"
|
||||
ufw allow from 10.0.0.0/8 to any port 443 comment 'allow local LAN HTTPS'
|
||||
ufw allow from 172.16.0.0/12 to any port 443 comment 'allow local LAN HTTPS'
|
||||
ufw allow from 192.168.0.0/16 to any port 443 comment 'allow local LAN HTTPS'
|
||||
echo "open firewall for auto nat discover (see issue #129)"
|
||||
echo "open firewall for auto nat discover (see issue #129 & #3144)"
|
||||
ufw allow proto udp from 10.0.0.0/8 port 1900 to any comment 'allow local LAN SSDP for UPnP discovery'
|
||||
ufw allow proto udp from 172.16.0.0/12 port 1900 to any comment 'allow local LAN SSDP for UPnP discovery'
|
||||
ufw allow proto udp from 192.168.0.0/16 port 1900 to any comment 'allow local LAN SSDP for UPnP discovery'
|
||||
ufw allow proto udp from 192.168.0.0/16 port 5350 to any comment 'Bonjour NAT'
|
||||
ufw allow proto udp from 172.16.0.0/12 port 5350 to any comment 'Bonjour NAT'
|
||||
ufw allow proto udp from 192.168.0.0/16 port 5351 to any comment 'Bonjour NAT'
|
||||
ufw allow proto udp from 172.16.0.0/12 port 5351 to any comment 'Bonjour NAT'
|
||||
|
||||
echo "enable lazy firewall"
|
||||
ufw --force enable
|
||||
echo ""
|
||||
@ -185,17 +186,43 @@ sed -i "s/^setupStep=.*/setupStep=100/g" /home/admin/raspiblitz.info
|
||||
##########################
|
||||
# PROVISIONING SERVICES
|
||||
##########################
|
||||
/home/admin/_cache.sh set message "Installing Services"
|
||||
|
||||
echo "### CHECKING BLITZ-API/FRONT STATUS ###" >> ${logFile}
|
||||
blitzApiInstalled=$(systemctl status blitzapi | grep -c "loaded")
|
||||
echo "# blitzapi(${blitzapi}) blitzApiInstalled(${blitzApiInstalled})"
|
||||
if [ "${blitzapi}" != "on" ] && [ ${blitzApiInstalled} -gt 0 ]; then
|
||||
/home/admin/_cache.sh set message "Deactivated API/WebUI (as in your config) - please use SSH for further setup"
|
||||
sleep 10
|
||||
else
|
||||
/home/admin/_cache.sh set message "Installing Services"
|
||||
fi
|
||||
|
||||
# BLITZ WEB SERVICE
|
||||
echo "Provisioning BLITZ WEB SERVICE - run config script" >> ${logFile}
|
||||
/home/admin/config.scripts/blitz.web.sh https-on >> ${logFile} 2>&1
|
||||
|
||||
# deinstall when not explizit 'on' when blitzapi is installed by fatpack
|
||||
# https://github.com/raspiblitz/raspiblitz/issues/4171#issuecomment-1728302628
|
||||
if [ "${blitzapi}" != "on" ] && [ ${blitzApiInstalled} -gt 0 ]; then
|
||||
echo "blitz_api directory exists & blitzapi is not 'on' - deactivating blitz-api" >> ${logFile}
|
||||
/home/admin/config.scripts/blitz.web.api.sh off >> ${logFile} 2>&1
|
||||
/home/admin/config.scripts/blitz.web.ui.sh off >> ${logFile} 2>&1
|
||||
fi
|
||||
# WebAPI & UI (in case image was not fatpack - but webapi was switchen on)
|
||||
if [ "${blitzapi}" == "on" ] && [ $blitzApiInstalled -eq 0 ]; then
|
||||
echo "Provisioning BlitzAPI - run config script" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "Setup BlitzAPI (takes time)"
|
||||
/home/admin/config.scripts/blitz.web.api.sh on DEFAULT >> ${logFile} 2>&1
|
||||
/home/admin/config.scripts/blitz.web.ui.sh on DEFAULT >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning BlitzAPI - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
echo "### RUNNING PROVISIONING SERVICES ###" >> ${logFile}
|
||||
|
||||
# BITCOIN INTERIMS UPDATE
|
||||
if [ ${#bitcoinInterimsUpdate} -gt 0 ]; then
|
||||
/home/admin/_cache.sh set message "Provisioning Bitcoin Core update"
|
||||
/home/admin/_cache.sh set message "Bitcoin Core update"
|
||||
if [ "${bitcoinInterimsUpdate}" == "reckless" ]; then
|
||||
# recklessly update Bitcoin Core to latest release on GitHub
|
||||
echo "Provisioning Bitcoin Core reckless interims update" >> ${logFile}
|
||||
@ -233,13 +260,27 @@ fi
|
||||
if [ ${#clInterimsUpdate} -gt 0 ]; then
|
||||
/home/admin/_cache.sh set message "Provisioning CL update"
|
||||
if [ "${clInterimsUpdate}" == "reckless" ]; then
|
||||
# recklessly update CL to latest release on GitHub (just for test & dev nodes)
|
||||
echo "Provisioning CL reckless interims update" >> ${logFile}
|
||||
/home/admin/config.scripts/cl.update.sh reckless >> ${logFile}
|
||||
# determine the database version # Examples: 216 is CLN v23.02.2 # 219 is CLN v23.05
|
||||
clDbVersion=$(sqlite3 /mnt/hdd/app-data/.lightning/bitcoin/lightningd.sqlite3 "SELECT version FROM version;")
|
||||
if [ ${#clDbVersion} -eq 0 ]; then
|
||||
echo "Could not determine the CLN database version - using 0" >> ${logFile}
|
||||
clDbVersion=0
|
||||
else
|
||||
echo "The CLN database version is ${clDbVersion}" >> ${logFile}
|
||||
fi
|
||||
if [ ${clDbVersion} -lt 217 ]; then
|
||||
# even if reckless is set - update to the recommended release
|
||||
echo "Provisioning CL verified interims update" >> ${logFile}
|
||||
/home/admin/config.scripts/cl.update.sh verified >> ${logFile}
|
||||
else # 217 or higher
|
||||
# recklessly update CL to latest release on GitHub (just for test & dev nodes)
|
||||
echo "Provisioning CL reckless interims update" >> ${logFile}
|
||||
/home/admin/config.scripts/cl.update.sh reckless >> ${logFile}
|
||||
fi
|
||||
else
|
||||
# when installing the same sd image - this will re-trigger the secure interims update
|
||||
# if this a update with a newer RaspiBlitz version .. interims update will be ignored
|
||||
# because standard CL version is most more up to date
|
||||
# if this is an update with a newer RaspiBlitz version .. interims update will be ignored
|
||||
# because the standard CL version is up to date
|
||||
echo "Provisioning CL verified interims update" >> ${logFile}
|
||||
/home/admin/config.scripts/cl.update.sh verified ${clInterimsUpdate} >> ${logFile}
|
||||
fi
|
||||
@ -247,27 +288,9 @@ else
|
||||
echo "Provisioning CL interims update - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
# Bitcoin Testnet
|
||||
if [ "${testnet}" == "on" ]; then
|
||||
echo "Provisioning ${network} Testnet - run config script" >> ${logFile}
|
||||
/home/admin/config.scripts/bitcoin.install.sh on testnet >> ${logFile} 2>&1
|
||||
systemctl start tbitcoind >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning ${network} Testnet - not active" >> ${logFile}
|
||||
fi
|
||||
|
||||
# Bitcoin Signet
|
||||
if [ "${signet}" == "on" ]; then
|
||||
echo "Provisioning ${network} Signet - run config script" >> ${logFile}
|
||||
/home/admin/config.scripts/bitcoin.install.sh on signet >> ${logFile} 2>&1
|
||||
systemctl start sbitcoind >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning ${network} Signet - not active" >> ${logFile}
|
||||
fi
|
||||
|
||||
# LND binary install
|
||||
if [ "${lightning}" == "lnd" ] || [ "${lnd}" == "on" ] || [ "${tlnd}" == "on" ] || [ "${slnd}" == "on" ]; then
|
||||
# if already installed by fatpack will skip
|
||||
# if already installed by fatpack will skip
|
||||
echo "Provisioning LND Binary - run config script" >> ${logFile}
|
||||
/home/admin/config.scripts/lnd.install.sh install >> ${logFile} 2>&1
|
||||
else
|
||||
@ -302,12 +325,9 @@ fi
|
||||
|
||||
# CORE LIGHTNING binary install
|
||||
if [ "${lightning}" == "cl" ] || [ "${cl}" == "on" ] || [ "${tcl}" == "on" ] || [ "${scl}" == "on" ]; then
|
||||
# if already installed by fatpack will skip
|
||||
# if already installed by fatpack will skip
|
||||
echo "Provisioning Core Lightning Binary - run config script" >> ${logFile}
|
||||
/home/admin/config.scripts/cl.install.sh install >> ${logFile} 2>&1
|
||||
echo "Provisioning cl-plugin.cln-grpc.sh - run config script" >> ${logFile}
|
||||
/home/admin/config.scripts/cl-plugin.cln-grpc.sh install >> ${logFile}
|
||||
/home/admin/config.scripts/cl-plugin.cln-grpc.sh on >> ${logFile}
|
||||
else
|
||||
echo "Provisioning Core Lightning Binary - not active" >> ${logFile}
|
||||
fi
|
||||
@ -336,6 +356,7 @@ else
|
||||
echo "Provisioning CL Signet - not active" >> ${logFile}
|
||||
fi
|
||||
|
||||
|
||||
# TOR
|
||||
if [ "${runBehindTor}" == "on" ]; then
|
||||
echo "Provisioning TOR - run config script" >> ${logFile}
|
||||
@ -345,26 +366,6 @@ else
|
||||
echo "Provisioning Tor - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
# WebAPI & UI (in case image was not fatpack - but webapi was switchen on)
|
||||
blitzApiInstalled=$(systemctl status blitzapi | grep -c "loaded")
|
||||
if [ "${blitzapi}" == "on" ] && [ $blitzApiInstalled -eq 0 ]; then
|
||||
echo "Provisioning BlitzAPI - run config script" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "Setup BlitzAPI (takes time)"
|
||||
/home/admin/config.scripts/blitz.web.api.sh on >> ${logFile} 2>&1
|
||||
/home/admin/config.scripts/blitz.web.ui.sh on >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning BlitzAPI - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
# AUTO PILOT
|
||||
if [ "${autoPilot}" = "on" ]; then
|
||||
echo "Provisioning AUTO PILOT - run config script" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "Setup AutoPilot"
|
||||
/home/admin/config.scripts/lnd.autopilot.sh on >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning AUTO PILOT - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
# NETWORK UPNP
|
||||
if [ "${networkUPnP}" = "on" ]; then
|
||||
echo "Provisioning NETWORK UPnP - run config script" >> ${logFile}
|
||||
@ -401,15 +402,6 @@ else
|
||||
echo "Provisioning RTL CL - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
# SPARKO
|
||||
if [ "${sparko}" = "on" ]; then
|
||||
echo "Provisioning Sparko - run config script" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "Setup SPARKO"
|
||||
sudo -u admin /home/admin/config.scripts/cl-plugin.sparko.sh on mainnet >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning Sparko - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
# clHTTPplugin
|
||||
if [ "${clHTTPplugin}" = "on" ]; then
|
||||
echo "Provisioning clHTTPplugin - run config script" >> ${logFile}
|
||||
@ -419,22 +411,22 @@ else
|
||||
echo "Provisioning clHTTPplugin - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
# SPARK
|
||||
if [ "${spark}" = "on" ]; then
|
||||
echo "Provisioning Spark Wallet - run config script" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "Setup SPARK WALLET"
|
||||
sudo -u admin /home/admin/config.scripts/cl.spark.sh on mainnet >> ${logFile} 2>&1
|
||||
# clboss
|
||||
if [ "${clboss}" = "on" ]; then
|
||||
echo "Provisioning clboss - run config script" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "Setup clboss"
|
||||
sudo -u admin /home/admin/config.scripts/cl-plugin.clboss.sh on >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning Spark Wallet - keep default" >> ${logFile}
|
||||
echo "Provisioning clboss - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
#LOOP - install only if LiT won't be installed
|
||||
if [ "${loop}" = "on" ] && [ "${lit}" != "on" ]; then
|
||||
echo "Provisioning Lightning Loop - run config script" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "Setup Lightning Loop"
|
||||
sudo -u admin /home/admin/config.scripts/bonus.loop.sh on >> ${logFile} 2>&1
|
||||
# clWatchtowerClient
|
||||
if [ "${clWatchtowerClient}" = "on" ]; then
|
||||
echo "Provisioning clWatchtowerClient - run config script" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "Setup clWatchtowerClient"
|
||||
sudo -u admin /home/admin/config.scripts/cl-plugin.watchtower-client.sh on >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning Lightning Loop - keep default" >> ${logFile}
|
||||
echo "Provisioning clWatchtowerClient - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
#BTC RPC EXPLORER
|
||||
@ -455,6 +447,15 @@ else
|
||||
echo "Provisioning ElectRS - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
#FULCRUM
|
||||
if [ "${fulcrum}" = "on" ]; then
|
||||
echo "Provisioning Fulcrum - run config script" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "Setup Fulcrum"
|
||||
sudo -u admin /home/admin/config.scripts/bonus.fulcrum.sh on >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning Fulcrum - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
# BTCPAYSERVER
|
||||
if [ "${BTCPayServer}" = "on" ]; then
|
||||
|
||||
@ -466,16 +467,6 @@ else
|
||||
echo "Provisioning BTCPayServer - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
# deprecated - see: #2031
|
||||
# LNDMANAGE
|
||||
#if [ "${lndmanage}" = "on" ]; then
|
||||
# echo "Provisioning lndmanage - run config script" >> ${logFile}
|
||||
# /home/admin/_cache.sh set message "Setup lndmanage"
|
||||
# sudo -u admin /home/admin/config.scripts/bonus.lndmanage.sh on >> ${logFile} 2>&1
|
||||
#else
|
||||
# echo "Provisioning lndmanage - not active" >> ${logFile}
|
||||
#fi
|
||||
|
||||
# CUSTOM PORT
|
||||
echo "Provisioning LND Port" >> ${logFile}
|
||||
if [ ${#lndPort} -eq 0 ]; then
|
||||
@ -540,14 +531,14 @@ else
|
||||
echo "Provisioning LCD rotate - not needed, keep default rotate on" >> ${logFile}
|
||||
fi
|
||||
|
||||
# TOUCHSCREEN
|
||||
if [ "${#touchscreen}" -gt 0 ]; then
|
||||
echo "Provisioning Touchscreen - run config script" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "Setup Touchscreen"
|
||||
/home/admin/config.scripts/blitz.touchscreen.sh ${touchscreen} >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning Touchscreen - not active" >> ${logFile}
|
||||
fi
|
||||
# TOUCHSCREEN - deactivated see https://github.com/raspiblitz/raspiblitz/pull/4609#issuecomment-2144406124
|
||||
# if [ "${#touchscreen}" -gt 0 ]; then
|
||||
# echo "Provisioning Touchscreen - run config script" >> ${logFile}
|
||||
# /home/admin/_cache.sh set message "Setup Touchscreen"
|
||||
# /home/admin/config.scripts/blitz.touchscreen.sh ${touchscreen} >> ${logFile} 2>&1
|
||||
# else
|
||||
# echo "Provisioning Touchscreen - not active" >> ${logFile}
|
||||
# fi
|
||||
|
||||
# UPS
|
||||
if [ "${#ups}" -gt 0 ]; then
|
||||
@ -579,13 +570,13 @@ else
|
||||
echo "Provisioning JoinMarket - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
# JoinMarket Web UI
|
||||
if [ "${joinmarketWebUI}" = "on" ]; then
|
||||
echo "Provisioning JoinMarket Web UI - run config script" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "Setup JoinMarket Web UI"
|
||||
sudo /home/admin/config.scripts/bonus.joinmarket-webui.sh on >> ${logFile} 2>&1
|
||||
# Jam
|
||||
if [ "${jam}" = "on" ]; then
|
||||
echo "Provisioning Jam - run config script" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "Setup Jam"
|
||||
sudo /home/admin/config.scripts/bonus.jam.sh on >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning JoinMarket Web UI - keep default" >> ${logFile}
|
||||
echo "Provisioning Jam - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
# Specter
|
||||
@ -597,15 +588,6 @@ else
|
||||
echo "Provisioning Specter - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
# Faraday
|
||||
if [ "${faraday}" = "on" ]; then
|
||||
echo "Provisioning Faraday - run config script" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "Setup Faraday"
|
||||
sudo -u admin /home/admin/config.scripts/bonus.faraday.sh on >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning Faraday - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
# BOS
|
||||
if [ "${bos}" = "on" ]; then
|
||||
echo "Provisioning Balance of Satoshis - run config script" >> ${logFile}
|
||||
@ -669,15 +651,6 @@ else
|
||||
echo "Provisioning Stacking Sats Kraken - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
# Pool - install only if LiT won't be installed
|
||||
if [ "${pool}" = "on" ] && [ "${lit}" != "on" ]; then
|
||||
echo "Provisioning Pool - run config script" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "Setup Pool"
|
||||
sudo -u admin /home/admin/config.scripts/bonus.pool.sh on >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning Pool - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
# lit (make sure to be installed after RTL)
|
||||
if [ "${lit}" = "on" ]; then
|
||||
echo "Provisioning LIT - run config script" >> ${logFile}
|
||||
@ -687,13 +660,22 @@ else
|
||||
echo "Provisioning LIT - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
# sphinxrelay
|
||||
if [ "${sphinxrelay}" = "on" ]; then
|
||||
echo "Sphinx-Relay - run config script" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "Setup Sphinx-Relay"
|
||||
sudo -u admin /home/admin/config.scripts/bonus.sphinxrelay.sh on >> ${logFile} 2>&1
|
||||
# labelbase
|
||||
if [ "${labelbase}" = "on" ]; then
|
||||
echo "Provisioning Labelbase - run config script" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "Setup Labelbase"
|
||||
sudo -u admin /home/admin/config.scripts/bonus.labelbase.sh on >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Sphinx-Relay - keep default" >> ${logFile}
|
||||
echo "Provisioning Labelbase - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
# lndg
|
||||
if [ "${lndg}" = "on" ]; then
|
||||
echo "Provisioning LNDg - run config script" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "Setup LNDg"
|
||||
sudo -u admin /home/admin/config.scripts/bonus.lndg.sh on >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning LNDg - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
# helipad
|
||||
@ -714,49 +696,31 @@ else
|
||||
echo "Provisioning CircuitBreaker - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
# homer
|
||||
if [ "${homer}" = "on" ]; then
|
||||
echo "Provisioning Homer - run config script" >> ${logFile}
|
||||
sudo sed -i "s/^message=.*/message='Setup Homer'/g" ${infoFile}
|
||||
sudo -u admin /home/admin/config.scripts/bonus.homer.sh on >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning Homer - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
# tallycoin_connect
|
||||
if [ "${tallycoinConnect}" = "on" ]; then
|
||||
echo "Provisioning Tallycoin Connect - run config script" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "Setup Tallycoin Connect"
|
||||
sudo -u admin /home/admin/config.scripts/bonus.tallycoin-connect.sh on >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning Tallycoin Connect - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
# bitcoinminds.org
|
||||
if [ "${bitcoinminds}" = "on" ]; then
|
||||
echo "Provisioning bitcoinminds.org - run config script" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "Setup Bitcoinminds.org"
|
||||
sudo -u admin /home/admin/config.scripts/bonus.bitcoinminds.sh on >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning bitcoinminds.org - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
# squeaknode
|
||||
if [ "${squeaknode}" = "on" ]; then
|
||||
echo "Provisioning Squeaknode - run config script" >> ${logFile}
|
||||
sudo sed -i "s/^message=.*/message='Setup Squeaknode '/g" ${infoFile}
|
||||
/home/admin/_cache.sh set message "Setup Squeaknode"
|
||||
sudo -u admin /home/admin/config.scripts/bonus.squeaknode.sh on >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning Squeaknode - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
# itchysats
|
||||
if [ "${itchysats}" = "on" ]; then
|
||||
echo "Provisioning ItchySats - run config script" >> ${logFile}
|
||||
sudo sed -i "s/^message=.*/message='Setup ItchySats'/g" ${infoFile}
|
||||
sudo -u admin /home/admin/config.scripts/bonus.itchysats.sh on --download >> ${logFile} 2>&1
|
||||
# LightningTipBot
|
||||
if [ "${lightningtipbot}" = "on" ]; then
|
||||
echo "Provisioning LightningTipBot - run config script" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "Setup LightningTipBot"
|
||||
sudo -u admin /home/admin/config.scripts/bonus.lightningtipbot.sh on >> ${logFile} 2>&1
|
||||
else
|
||||
echo "ItchySats - keep default" >> ${logFile}
|
||||
echo "Provisioning LightningTipBot - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
# FinTS
|
||||
if [ "${fints}" = "on" ]; then
|
||||
echo "Provisioning FinTS - run config script" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "Setup FinTS"
|
||||
sudo -u admin /home/admin/config.scripts/bonus.fints.sh on >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning FinTS - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
# custom install script from user
|
||||
@ -787,7 +751,7 @@ if [ -d "/var/cache/raspiblitz/tls_backup" ]; then
|
||||
cp /var/cache/raspiblitz/tls_backup/tls.cert /mnt/hdd/lnd/tls.cert >> ${logFile} 2>&1
|
||||
cp /var/cache/raspiblitz/tls_backup/tls.key /mnt/hdd/lnd/tls.key >> ${logFile} 2>&1
|
||||
chown -R bitcoin:bitcoin /mnt/hdd/lnd >> ${logFile} 2>&1
|
||||
echo "On next final restart admin creds will be updated by _boostrap.sh" >> ${logFile}
|
||||
echo "On next final restart admin creds will be updated by _bootstrap.sh" >> ${logFile}
|
||||
|
||||
echo "DONE" >> ${logFile}
|
||||
else
|
||||
@ -804,6 +768,15 @@ if [ ${confExists} -eq 0 ]; then
|
||||
chown bitcoin:bitcoin /mnt/hdd/bitcoin/bitcoin.conf
|
||||
fi
|
||||
|
||||
# I2P
|
||||
echo "Start i2pd" >> ${logFile}
|
||||
/home/admin/_cache.sh set message "i2pd setup"
|
||||
/home/admin/config.scripts/blitz.i2pd.sh on >> ${logFile}
|
||||
|
||||
# clean up raspiblitz config from old settings
|
||||
sed -i '/^autoPilot=/d' /mnt/hdd/raspiblitz.conf
|
||||
sed -i '/^lndKeysend=/d' /mnt/hdd/raspiblitz.conf
|
||||
|
||||
# signal setup done
|
||||
/home/admin/_cache.sh set message "Setup Done"
|
||||
|
||||
@ -851,12 +824,12 @@ echo "Make sure main services are running .." >> ${logFile}
|
||||
systemctl start ${network}d
|
||||
if [ "${lightning}" == "lnd" ];then
|
||||
systemctl start lnd
|
||||
sleep 10
|
||||
# set password c if given in flag from migration prep
|
||||
passwordFlagExists=$(ls /mnt/hdd/passwordc.flag | grep -c "passwordc.flag")
|
||||
if [ "${passwordFlagExists}" == "1" ]; then
|
||||
echo "Found /mnt/hdd/passwordc.flag .. changing password" >> ${logFile}
|
||||
oldPasswordC=$(cat /mnt/hdd/passwordc.flag)
|
||||
if ! pip list | grep grpc; then sudo -H python3 -m pip install grpcio==1.38.1; fi
|
||||
/home/admin/config.scripts/lnd.initwallet.py change-password mainnet "${oldPasswordC}" "${passwordC}" >> ${logFile}
|
||||
shred -u /mnt/hdd/passwordc.flag
|
||||
else
|
||||
|
@ -1,2 +1,3 @@
|
||||
# RaspiBlitz Version - always [major].[main].[sub] (sub can be a string like '2rc1')
|
||||
codeVersion="1.8.0"
|
||||
codeVersion="1.11.1"
|
||||
# keep last line with comment ---> IF YOU HAVE A NEW VERSION BRANCH > EDIT ALSO build_sdcard.sh
|
@ -11,6 +11,9 @@ txindex=0
|
||||
disablewallet=1
|
||||
peerbloomfilters=1
|
||||
datadir=/mnt/hdd/bitcoin
|
||||
main.debuglogfile=/mnt/hdd/bitcoin/debug.log
|
||||
test.debuglogfile=/mnt/hdd/bitcoin/testnet3/debug.log
|
||||
signet.debuglogfile=/mnt/hdd/bitcoin/signet/debug.log
|
||||
|
||||
# Connection settings
|
||||
rpcuser=raspibolt
|
||||
|
@ -1,57 +0,0 @@
|
||||
# RaspiBlitz: systemd unit for bitcoind
|
||||
# based on https://github.com/bitcoin/bitcoin/blob/master/contrib/init/bitcoind.service
|
||||
[Unit]
|
||||
Description=Bitcoin daemon
|
||||
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
# for use with sendmail alert
|
||||
#OnFailure=systemd-sendmail@%n
|
||||
|
||||
[Service]
|
||||
ExecStartPre=-/home/admin/config.scripts/blitz.systemd.sh log blockchain STARTED
|
||||
ExecStart=/usr/local/bin/bitcoind -daemonwait \
|
||||
-conf=/mnt/hdd/bitcoin/bitcoin.conf \
|
||||
-datadir=/mnt/hdd/bitcoin \
|
||||
-debuglogfile=/mnt/hdd/bitcoin/debug.log
|
||||
|
||||
# Make sure the config directory is readable by the service user
|
||||
PermissionsStartOnly=true
|
||||
ExecStartPre=/bin/chgrp bitcoin /mnt/hdd/bitcoin
|
||||
|
||||
# Process management
|
||||
####################
|
||||
Type=forking
|
||||
Restart=on-failure
|
||||
TimeoutStartSec=infinity
|
||||
TimeoutStopSec=600
|
||||
|
||||
# Directory creation and permissions
|
||||
####################################
|
||||
# Run as bitcoin:bitcoin
|
||||
User=bitcoin
|
||||
Group=bitcoin
|
||||
|
||||
StandardOutput=null
|
||||
StandardError=journal
|
||||
|
||||
# Hardening measures
|
||||
####################
|
||||
# Provide a private /tmp and /var/tmp.
|
||||
PrivateTmp=true
|
||||
# Mount /usr, /boot/ and /etc read-only for the process.
|
||||
ProtectSystem=full
|
||||
# Deny access to /home, /root and /run/user
|
||||
ProtectHome=true
|
||||
# Disallow the process and all of its children to gain
|
||||
# new privileges through execve().
|
||||
NoNewPrivileges=true
|
||||
# Use a new /dev namespace only populated with API pseudo devices
|
||||
# such as /dev/null, /dev/zero and /dev/random.
|
||||
PrivateDevices=true
|
||||
# Deny the creation of writable and executable memory mappings.
|
||||
MemoryDenyWriteExecute=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -1,4 +1,4 @@
|
||||
# Boostrap the RaspiBlitz
|
||||
# Bootstrap the RaspiBlitz
|
||||
# /etc/systemd/system/bootstrap.service
|
||||
|
||||
[Unit]
|
||||
|