clavarium 0.1.0-next.3 → 0.1.0-next.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deploy/install.sh +15 -0
- package/deploy/updater.mjs +3 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/deploy/install.sh
CHANGED
|
@@ -601,6 +601,15 @@ if [ -n "$RELAY" ]; then
|
|
|
601
601
|
apt-get install -y -qq openssh-client >/dev/null
|
|
602
602
|
account clavarium-tunnel /nonexistent
|
|
603
603
|
install -d -o clavarium-tunnel -g clavarium-tunnel -m 0700 /var/lib/clavarium-tunnel
|
|
604
|
+
# An installation made before this script named the key "cle" and gave it
|
|
605
|
+
# to another account: the relay knows THAT key. It is taken over, never
|
|
606
|
+
# replaced, and what the tunnel reads is given to the account that runs it.
|
|
607
|
+
if [ ! -e /var/lib/clavarium-tunnel/key ] && [ -s /var/lib/clavarium-tunnel/cle ]; then
|
|
608
|
+
install -o clavarium-tunnel -g clavarium-tunnel -m 0600 /var/lib/clavarium-tunnel/cle /var/lib/clavarium-tunnel/key
|
|
609
|
+
[ -s /var/lib/clavarium-tunnel/cle.pub ] && install -o clavarium-tunnel -g clavarium-tunnel -m 0644 /var/lib/clavarium-tunnel/cle.pub /var/lib/clavarium-tunnel/key.pub
|
|
610
|
+
echo " the tunnel key of the earlier installation is kept: the relay already knows it"
|
|
611
|
+
fi
|
|
612
|
+
[ -e /var/lib/clavarium-tunnel/known_hosts ] && chown clavarium-tunnel:clavarium-tunnel /var/lib/clavarium-tunnel/known_hosts
|
|
604
613
|
# The private key is made here and never leaves this machine.
|
|
605
614
|
[ -e /var/lib/clavarium-tunnel/key ] || sudo -u clavarium-tunnel ssh-keygen -q -t ed25519 -N '' -C clavarium-tunnel -f /var/lib/clavarium-tunnel/key
|
|
606
615
|
# The relay's identity is taken once and then held: a different machine
|
|
@@ -652,6 +661,12 @@ if [ -n "$RELAY" ]; then
|
|
|
652
661
|
echo
|
|
653
662
|
echo "ON THE RELAY ($RELAY), run this one command; the tunnel then comes up by itself:"
|
|
654
663
|
echo " sudo deploy/relay.sh --key \"$TUNNEL_KEY\""
|
|
664
|
+
# A server with a screen and a keyboard only: the key, carried by a phone.
|
|
665
|
+
# It is a PUBLIC key: showing it is safe; it lets the relay know this machine.
|
|
666
|
+
if command -v qrencode >/dev/null 2>&1 || apt-get install -y -qq qrencode >/dev/null 2>&1; then
|
|
667
|
+
echo "The same key, to read with a phone or a tablet:"
|
|
668
|
+
qrencode -t ANSIUTF8 -m 2 -- "$TUNNEL_KEY" || true
|
|
669
|
+
fi
|
|
655
670
|
echo "It will print this, and it must be the same: $RELAY_PRINT"
|
|
656
671
|
echo "The name $DOMAIN must lead to the relay."
|
|
657
672
|
else
|
package/deploy/updater.mjs
CHANGED
|
@@ -480,7 +480,9 @@ export class Updater {
|
|
|
480
480
|
if ((state.history ?? []).some((h) => h.to === available && h.action === 'update' && h.result !== 'done')) return `${available} failed here before: not tried again by itself`;
|
|
481
481
|
if (this.busy()) return this.busy();
|
|
482
482
|
await this.apply(available);
|
|
483
|
-
|
|
483
|
+
/* What the history says, not what was hoped: a version that did not start was undone. */
|
|
484
|
+
const last = (this.#state().history ?? []).at(-1);
|
|
485
|
+
return last?.to === available && last.result !== 'done' ? `${available} did not work: back to ${last.from ?? 'nothing'} (${last.why ?? last.result})` : `updated to ${available}`;
|
|
484
486
|
}
|
|
485
487
|
|
|
486
488
|
/* What the host program asked (a request file), or the timer's turn. */
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clavarium",
|
|
3
|
-
"version": "0.1.0-next.
|
|
3
|
+
"version": "0.1.0-next.5",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "clavarium",
|
|
9
|
-
"version": "0.1.0-next.
|
|
9
|
+
"version": "0.1.0-next.5",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xterm/addon-fit": "^0.11.0",
|