clavarium 0.1.0-next.3 → 0.1.0-next.4

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 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
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.1.0-next.3",
3
+ "version": "0.1.0-next.4",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "clavarium",
9
- "version": "0.1.0-next.3",
9
+ "version": "0.1.0-next.4",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@xterm/addon-fit": "^0.11.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clavarium",
3
- "version": "0.1.0-next.3",
3
+ "version": "0.1.0-next.4",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "description": "A conversation is a VM with a terminal in it. Everything else is a folder.",
package/server/main.mjs CHANGED
@@ -397,6 +397,8 @@ function hostSetting(key) {
397
397
  }
398
398
 
399
399
  if (process.argv[1] === fileURLToPath(import.meta.url)) {
400
+ /* DELIBERATELY BROKEN, this version only: it proves an update that does not start is undone by itself. */
401
+ console.error('0.1.0-next.4 refuses to start, on purpose: the updater must go back by itself.'); process.exit(70);
400
402
  const argv = process.argv.slice(2);
401
403
  const port = Number(option(argv, 'port', '7717'));
402
404
  const host = option(argv, 'host', '');