Files
Clawd BotandClaude Opus 4.6 ca9b510922 chore: align with upstream openclaw/openclaw and overlay local additions
- Reset master to upstream/main (16,697 commits)
- Overlay 2,271 local-only files (skills, tools, workspace, configs, apps)
- Restore IDENTITY.md and USER.md templates
- Build verified, gateway running, Discord working

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-03-03 07:40:46 +01:00

64 lines
1.8 KiB
Bash

#!/usr/bin/env bash
# Install voice-surface as a systemd service
set -euo pipefail
if [ "$EUID" -eq 0 ]; then
echo "❌ Don't run this as root. Run as your user and it will sudo when needed."
exit 1
fi
USER=$(whoami)
SERVICE_FILE="[email protected]"
INSTALL_PATH="/etc/systemd/system/$SERVICE_FILE"
echo "📦 Installing Voice Surface systemd service for user: $USER"
echo ""
# Check if service file exists
if [ ! -f "$SERVICE_FILE" ]; then
echo "❌ Service file not found: $SERVICE_FILE"
echo " Run this from tools/voice-surface/"
exit 1
fi
# Copy service file
echo "1️⃣ Copying service file..."
sudo cp "$SERVICE_FILE" "$INSTALL_PATH"
echo " ✓ Installed to $INSTALL_PATH"
# Prompt for token
echo ""
echo "2️⃣ Configure authentication token"
read -p " Enter AUTH_TOKEN (or press enter for auto-generated): " TOKEN
if [ -z "$TOKEN" ]; then
TOKEN=$(openssl rand -hex 16)
echo " Generated token: $TOKEN"
fi
# Update service file with token
sudo sed -i "s/CHANGE_ME_TO_SECURE_TOKEN/$TOKEN/" "$INSTALL_PATH"
echo " ✓ Token configured"
# Reload systemd
echo ""
echo "3️⃣ Reloading systemd..."
sudo systemctl daemon-reload
echo " ✓ Daemon reloaded"
echo ""
echo "✅ Installation complete!"
echo ""
echo "Service name: voice-surface@$USER"
echo ""
echo "Useful commands:"
echo " sudo systemctl start voice-surface@$USER # Start the service"
echo " sudo systemctl stop voice-surface@$USER # Stop the service"
echo " sudo systemctl enable voice-surface@$USER # Auto-start on boot"
echo " sudo systemctl status voice-surface@$USER # Check status"
echo " sudo journalctl -u voice-surface@$USER -f # Follow logs"
echo ""
echo "Access URL: http://192.168.1.220:3030/?token=$TOKEN"
echo ""
echo "⚠️ Save your token! You'll need it to access the interface."