split gpuctl

This commit is contained in:
Mikan
2026-10-09 00:17:50 +04:00
parent 4c5d35ebd4
commit 654126be43
7 changed files with 496 additions and 344 deletions

25
ssh/scripts/common.sh Normal file
View File

@@ -0,0 +1,25 @@
#!/bin/sh
PROJECT_DIR="${PROJECT_DIR:-/project}"
COMPOSE_FILE="$PROJECT_DIR/compose.yaml"
require_host_project_path() {
if [ -z "${HOST_PROJECT_PATH:-}" ]; then
echo "ERROR: HOST_PROJECT_PATH is not set." >&2
exit 1
fi
}
require_ssh_role() {
if [ -z "${SSH_ROLE:-}" ]; then
echo "ERROR: SSH_ROLE is not set." >&2
exit 1
fi
}
require_project_dir() {
if [ ! -d "$PROJECT_DIR" ]; then
echo "ERROR: Project directory not found: $PROJECT_DIR" >&2
exit 1
fi
}