feat(detmir): add rust linux install planners

This commit is contained in:
igor04091968
2026-06-02 18:23:44 +03:00
parent 632962a90e
commit 63774cb8c4
12 changed files with 511 additions and 2 deletions
@@ -19,6 +19,7 @@ required_bins=(
aw-db-maintenance
aw-ensure-reliability
aw-health-check
aw-linux-install
aw-prune-local-state
check-aw-data
check-aw-full
+33
View File
@@ -11,6 +11,39 @@ LOG_DIR="${HOME}/.local/state/aw-console-ssh-logger/logs"
SYSTEMD_USER_DIR="${HOME}/.config/systemd/user"
BASHRC="${HOME}/.bashrc"
BASH_PROFILE="${HOME}/.bash_profile"
SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
ROOT_DIR="$(CDPATH= cd -- "${SCRIPT_DIR}/.." && pwd)"
SELF_PATH="${SCRIPT_DIR}/$(basename -- "$0")"
if [ "${1:-}" = "--apply-legacy" ]; then
shift
else
TARGET_ROOT="${CARGO_TARGET_DIR:-${ROOT_DIR}/adk-rust/target}"
for candidate in \
"${AW_LINUX_INSTALL_RUST:-}" \
"${TARGET_ROOT}/release/aw-linux-install" \
"${ROOT_DIR}/adk-rust/target/release/aw-linux-install" \
"/usr/local/bin/aw-linux-install"; do
if [ -n "$candidate" ] && [ -x "$candidate" ]; then
exec "$candidate" --kind console-ssh --legacy-script "$SELF_PATH" "$@"
fi
done
cat >&2 <<'EOF'
install_aw_console_ssh_logger.sh now requires the Rust planner for safe default runs.
Build it first:
cd adk-rust && cargo build --release -p aw-linux-install
Safe dry-run:
scripts/install_aw_console_ssh_logger.sh --json
Explicit install:
scripts/install_aw_console_ssh_logger.sh --apply
Old shell install:
scripts/install_aw_console_ssh_logger.sh --apply-legacy
EOF
exit 2
fi
usage() {
cat <<'EOF'
+33
View File
@@ -9,6 +9,39 @@ BIN_DIR="${HOME}/.local/bin"
AUTOSTART_DIR="${HOME}/.config/autostart"
CONFIG_ROOT="${XDG_CONFIG_HOME:-$HOME/.config}/activitywatch"
FORCE="0"
SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
ROOT_DIR="$(CDPATH= cd -- "${SCRIPT_DIR}/.." && pwd)"
SELF_PATH="${SCRIPT_DIR}/$(basename -- "$0")"
if [ "${1:-}" = "--apply-legacy" ]; then
shift
else
TARGET_ROOT="${CARGO_TARGET_DIR:-${ROOT_DIR}/adk-rust/target}"
for candidate in \
"${AW_LINUX_INSTALL_RUST:-}" \
"${TARGET_ROOT}/release/aw-linux-install" \
"${ROOT_DIR}/adk-rust/target/release/aw-linux-install" \
"/usr/local/bin/aw-linux-install"; do
if [ -n "$candidate" ] && [ -x "$candidate" ]; then
exec "$candidate" --kind client --legacy-script "$SELF_PATH" "$@"
fi
done
cat >&2 <<'EOF'
install_aw_linux_client.sh now requires the Rust planner for safe default runs.
Build it first:
cd adk-rust && cargo build --release -p aw-linux-install
Safe dry-run:
scripts/install_aw_linux_client.sh --json
Explicit install:
scripts/install_aw_linux_client.sh --apply
Old shell install:
scripts/install_aw_linux_client.sh --apply-legacy
EOF
exit 2
fi
usage() {
cat <<'EOF'
+36 -2
View File
@@ -5,6 +5,39 @@ SERVER_HOST="10.10.10.13"
SERVER_PORT="5600"
POLL_INTERVAL="5"
AW_VERSION="0.13.2"
SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
ROOT_DIR="$(CDPATH= cd -- "${SCRIPT_DIR}/.." && pwd)"
SELF_PATH="${SCRIPT_DIR}/$(basename -- "$0")"
if [ "${1:-}" = "--apply-legacy" ]; then
shift
else
TARGET_ROOT="${CARGO_TARGET_DIR:-${ROOT_DIR}/adk-rust/target}"
for candidate in \
"${AW_LINUX_INSTALL_RUST:-}" \
"${TARGET_ROOT}/release/aw-linux-install" \
"${ROOT_DIR}/adk-rust/target/release/aw-linux-install" \
"/usr/local/bin/aw-linux-install"; do
if [ -n "$candidate" ] && [ -x "$candidate" ]; then
exec "$candidate" --kind remote-worker --legacy-script "$SELF_PATH" "$@"
fi
done
cat >&2 <<'EOF'
install_aw_linux_remote_worker.sh now requires the Rust planner for safe default runs.
Build it first:
cd adk-rust && cargo build --release -p aw-linux-install
Safe dry-run:
scripts/install_aw_linux_remote_worker.sh --json
Explicit install:
scripts/install_aw_linux_remote_worker.sh --apply
Old shell install:
scripts/install_aw_linux_remote_worker.sh --apply-legacy
EOF
exit 2
fi
usage() {
cat <<'EOF'
@@ -49,19 +82,20 @@ while [ "$#" -gt 0 ]; do
esac
done
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
sh "${SCRIPT_DIR}/install_aw_linux_client.sh" \
--apply-legacy \
--server-host "${SERVER_HOST}" \
--server-port "${SERVER_PORT}" \
--version "${AW_VERSION}"
sh "${SCRIPT_DIR}/install_aw_console_ssh_logger.sh" \
--apply-legacy \
--server-host "${SERVER_HOST}" \
--server-port "${SERVER_PORT}" \
--poll-interval "${POLL_INTERVAL}"
sh "${SCRIPT_DIR}/install_aw_linux_web_category_logger.sh" \
--apply-legacy \
--server-host "${SERVER_HOST}" \
--server-port "${SERVER_PORT}" \
--poll-interval "${POLL_INTERVAL}"
@@ -10,6 +10,39 @@ STATE_DIR="${HOME}/.local/state/aw-linux-web-category"
LOG_DIR="${HOME}/.local/state/aw-linux-web-category/logs"
CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/aw-linux-web-category"
SYSTEMD_USER_DIR="${HOME}/.config/systemd/user"
SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
ROOT_DIR="$(CDPATH= cd -- "${SCRIPT_DIR}/.." && pwd)"
SELF_PATH="${SCRIPT_DIR}/$(basename -- "$0")"
if [ "${1:-}" = "--apply-legacy" ]; then
shift
else
TARGET_ROOT="${CARGO_TARGET_DIR:-${ROOT_DIR}/adk-rust/target}"
for candidate in \
"${AW_LINUX_INSTALL_RUST:-}" \
"${TARGET_ROOT}/release/aw-linux-install" \
"${ROOT_DIR}/adk-rust/target/release/aw-linux-install" \
"/usr/local/bin/aw-linux-install"; do
if [ -n "$candidate" ] && [ -x "$candidate" ]; then
exec "$candidate" --kind web-category --legacy-script "$SELF_PATH" "$@"
fi
done
cat >&2 <<'EOF'
install_aw_linux_web_category_logger.sh now requires the Rust planner for safe default runs.
Build it first:
cd adk-rust && cargo build --release -p aw-linux-install
Safe dry-run:
scripts/install_aw_linux_web_category_logger.sh --json
Explicit install:
scripts/install_aw_linux_web_category_logger.sh --apply
Old shell install:
scripts/install_aw_linux_web_category_logger.sh --apply-legacy
EOF
exit 2
fi
usage() {
cat <<'EOF'
+33
View File
@@ -9,6 +9,39 @@ STATE_DIR="/var/lib/aw-pve-webadmin-logger"
LOG_DIR="/var/log/aw-pve-webadmin-logger"
CONFIG_PATH="/etc/aw-pve-webadmin-logger/config.json"
SERVICE_PATH="/etc/systemd/system/aw-pve-webadmin-logger.service"
SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
ROOT_DIR="$(CDPATH= cd -- "${SCRIPT_DIR}/.." && pwd)"
SELF_PATH="${SCRIPT_DIR}/$(basename -- "$0")"
if [ "${1:-}" = "--apply-legacy" ]; then
shift
else
TARGET_ROOT="${CARGO_TARGET_DIR:-${ROOT_DIR}/adk-rust/target}"
for candidate in \
"${AW_LINUX_INSTALL_RUST:-}" \
"${TARGET_ROOT}/release/aw-linux-install" \
"${ROOT_DIR}/adk-rust/target/release/aw-linux-install" \
"/usr/local/bin/aw-linux-install"; do
if [ -n "$candidate" ] && [ -x "$candidate" ]; then
exec "$candidate" --kind pve-webadmin --legacy-script "$SELF_PATH" "$@"
fi
done
cat >&2 <<'EOF'
install_aw_pve_webadmin_logger.sh now requires the Rust planner for safe default runs.
Build it first:
cd adk-rust && cargo build --release -p aw-linux-install
Safe dry-run:
scripts/install_aw_pve_webadmin_logger.sh --json
Explicit install:
scripts/install_aw_pve_webadmin_logger.sh --apply
Old shell install:
scripts/install_aw_pve_webadmin_logger.sh --apply-legacy
EOF
exit 2
fi
usage() {
cat <<'EOF'