22 lines
533 B
Bash
Executable File
22 lines
533 B
Bash
Executable File
#!/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"
|