This commit is contained in:
Chris Wanstrath 2025-09-16 20:58:37 -07:00
parent 3a77e7bd00
commit 612b6d8c1d
6 changed files with 13 additions and 25 deletions

View File

@ -8,10 +8,10 @@
"dev": "env BUN_HOT=1 bun --hot src/server.tsx", "dev": "env BUN_HOT=1 bun --hot src/server.tsx",
"deploy": "./scripts/deploy.sh", "deploy": "./scripts/deploy.sh",
"push": "./scripts/deploy.sh", "push": "./scripts/deploy.sh",
"setup": "./scripts/setup.sh", "remote:install": "./scripts/remote-install.sh",
"remote:start": "./scripts/start.sh", "remote:start": "./scripts/remote-start.sh",
"remote:stop": "./scripts/stop.sh", "remote:stop": "./scripts/remote-stop.sh",
"remote:restart": "./scripts/restart.sh" "remote:restart": "./scripts/remote-restart.sh"
}, },
"alias": { "alias": {
"@utils": "./src/utils.tsx", "@utils": "./src/utils.tsx",

9
scripts/remote-install.sh Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
##
# setup your NOSEputer from your dev machine
HOST="chris@nose-pluto.local"
DEST="~/pluto"
ssh $HOST "cd $DEST && ./scripts/install.sh && sudo systemctl start nose-pluto.service"

View File

@ -1,21 +0,0 @@
#!/usr/bin/env bash
##
# setup your NOSEputer from your dev machine
set -euo pipefail
HOST="chris@nose-pluto.local"
DEST="~/pluto"
SOCK="$HOME/.ssh/cm-%r@%h:%p"
# 1) Open a master connection (prompts once)
ssh -MNf -o ControlMaster=yes -o ControlPersist=120 \
-o ControlPath="$SOCK" "$HOST"
# 2) remote install (reuses the connection)
ssh -o ControlPath="$SOCK" "$HOST" "cd $DEST && ./scripts/install.sh && sudo systemctl start nose-pluto.service"
# 3) close the master connection
ssh -O exit -o ControlPath="$SOCK" "$HOST"