mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-04-22 18:32:15 +00:00
IronClaw: Install keychain dependencies and launch in a DBus session
This commit is contained in:
@@ -16,6 +16,10 @@ update_os
|
||||
PG_VERSION="17" PG_MODULES="pgvector" setup_postgresql
|
||||
PG_DB_NAME="ironclaw" PG_DB_USER="ironclaw" PG_DB_EXTENSIONS="vector" setup_postgresql_db
|
||||
|
||||
msg_info "Installing secret service dependencies"
|
||||
$STD apt install -y dbus-user-session gnome-keyring libsecret-tools
|
||||
msg_ok "Installed secret service dependencies"
|
||||
|
||||
fetch_and_deploy_gh_release "ironclaw-bin" "nearai/ironclaw" "prebuild" "latest" "/usr/local/bin" \
|
||||
"ironclaw-$(uname -m)-unknown-linux-$([[ -f /etc/alpine-release ]] && echo "musl" || echo "gnu").tar.gz"
|
||||
chmod +x /usr/local/bin/ironclaw
|
||||
@@ -37,6 +41,13 @@ chmod 600 /root/.ironclaw/.env
|
||||
msg_ok "Configured IronClaw"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<'EOF' >/usr/local/bin/ironclaw-run.sh
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
exec dbus-run-session -- bash -lc 'gnome-keyring-daemon --start --components=secrets >/dev/null 2>&1 && exec /usr/local/bin/ironclaw'
|
||||
EOF
|
||||
chmod +x /usr/local/bin/ironclaw-run.sh
|
||||
|
||||
cat <<EOF >/etc/systemd/system/ironclaw.service
|
||||
[Unit]
|
||||
Description=IronClaw AI Agent
|
||||
@@ -46,7 +57,7 @@ After=network.target postgresql.service
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/root
|
||||
ExecStart=/usr/local/bin/ironclaw
|
||||
ExecStart=/usr/local/bin/ironclaw-run.sh
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
|
||||
Reference in New Issue
Block a user