diff --git a/package.json b/package.json index 13716a5..6e7bec5 100644 --- a/package.json +++ b/package.json @@ -8,10 +8,10 @@ "dev": "env BUN_HOT=1 bun --hot src/server.tsx", "deploy": "./scripts/deploy.sh", "push": "./scripts/deploy.sh", - "setup": "./scripts/setup.sh", - "remote:start": "./scripts/start.sh", - "remote:stop": "./scripts/stop.sh", - "remote:restart": "./scripts/restart.sh" + "remote:install": "./scripts/remote-install.sh", + "remote:start": "./scripts/remote-start.sh", + "remote:stop": "./scripts/remote-stop.sh", + "remote:restart": "./scripts/remote-restart.sh" }, "alias": { "@utils": "./src/utils.tsx", diff --git a/scripts/remote-install.sh b/scripts/remote-install.sh new file mode 100755 index 0000000..feff3d5 --- /dev/null +++ b/scripts/remote-install.sh @@ -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" \ No newline at end of file diff --git a/scripts/restart.sh b/scripts/remote-restart.sh similarity index 100% rename from scripts/restart.sh rename to scripts/remote-restart.sh diff --git a/scripts/start.sh b/scripts/remote-start.sh similarity index 100% rename from scripts/start.sh rename to scripts/remote-start.sh diff --git a/scripts/stop.sh b/scripts/remote-stop.sh similarity index 100% rename from scripts/stop.sh rename to scripts/remote-stop.sh diff --git a/scripts/setup.sh b/scripts/setup.sh deleted file mode 100755 index 379d4f6..0000000 --- a/scripts/setup.sh +++ /dev/null @@ -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"