Files
claude-code/automation/systemd/install-timers.sh
OpenCode Test 125bb4904b Add search command, history browser, install script, and systemd timers
- /search command to search across memory, history, and configuration
- history-browser.py for browsing and analyzing session history
- install.sh for first-time setup with directory creation and validation
- daily-maintenance.sh for scheduled backup, cleanup, and validation
- systemd timer units for automated daily maintenance at 6 AM
- Updated shell completions with 11 aliases
- Test suite now covers 19 tests
- Bump version to 1.1.0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 18:41:07 -08:00

32 lines
956 B
Bash
Executable File

#!/bin/bash
# Install systemd timers for Claude Code maintenance
# Run as root or with sudo
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SYSTEMD_DIR="/etc/systemd/system"
echo "Installing Claude Code systemd timers..."
# Copy service and timer files
sudo cp "${SCRIPT_DIR}/claude-maintenance.service" "${SYSTEMD_DIR}/"
sudo cp "${SCRIPT_DIR}/claude-maintenance.timer" "${SYSTEMD_DIR}/"
# Reload systemd
sudo systemctl daemon-reload
# Enable and start timer
sudo systemctl enable claude-maintenance.timer
sudo systemctl start claude-maintenance.timer
echo ""
echo "Timer installed successfully!"
echo ""
echo "Commands:"
echo " systemctl status claude-maintenance.timer # Check timer status"
echo " systemctl list-timers # List all timers"
echo " journalctl -u claude-maintenance.service # View logs"
echo " sudo systemctl start claude-maintenance # Run maintenance now"
echo ""