Systemd configuration #13

Merged
JMR-dev merged 1 commits from feat-create-systemd-service-integration into main 2025-10-07 23:23:26 +00:00
JMR-dev commented 2025-10-07 23:20:03 +00:00 (Migrated from github.com)
  1. Systemd Service File - rewrite/systemd/redshift-rebooted.service
    User service that starts after graphical session is available
    Uses %h/.local/bin/redshift-rebooted for user installs (systemd expands %h to $HOME)
    Auto-restart on failure with 3-second delay
    Targets default.target for automatic startup
  2. Installation Script - rewrite/scripts/install.sh
    Supports both user mode (default) and system-wide mode (--system flag)
    User mode: Installs to ~/.local/bin and ~/.config/systemd/user/
    System mode: Installs to /usr/bin and /usr/lib/systemd/user/
    Automatically builds the release binary
    Reloads systemd daemon
    Provides clear next-step instructions for enabling and starting the service
    Color-coded output for better readability
  3. Uninstallation Script - rewrite/scripts/uninstall.sh
    Mirrors the installation script with user/system modes
    Safely stops and disables the service before removal
    Removes binary and service files
    Preserves configuration files in ~/.config/redshift/
  4. Updated Documentation - rewrite/README.md
    Added comprehensive installation section with both modes
    Service management commands (enable, start, stop, status, logs)
    Troubleshooting guide for common issues
    Systemd service features and capabilities
    Configuration notes
    Key Features
    ✅ Easy Installation: Single command to build and install
    ✅ Automatic Startup: Service starts at login when enabled
    ✅ Auto-Restart: Recovers automatically from crashes
    ✅ User-Friendly: Clear instructions and color-coded output
    ✅ Flexible: Supports both user and system-wide installations
    ✅ Safe Uninstall: Properly cleans up service and binaries
    ✅ Well Documented: Comprehensive README with troubleshooting The implementation follows Linux best practices for systemd user services and provides a professional installation experience for users.
1. Systemd Service File - [rewrite/systemd/redshift-rebooted.service](vscode-webview://1at842bsak2p6q97kddh3jg9gfr5ql764vt5714hl6ck9n1j1fj6/rewrite/systemd/redshift-rebooted.service) User service that starts after graphical session is available Uses %h/.local/bin/redshift-rebooted for user installs (systemd expands %h to $HOME) Auto-restart on failure with 3-second delay Targets default.target for automatic startup 2. Installation Script - [rewrite/scripts/install.sh](vscode-webview://1at842bsak2p6q97kddh3jg9gfr5ql764vt5714hl6ck9n1j1fj6/rewrite/scripts/install.sh) Supports both user mode (default) and system-wide mode (--system flag) User mode: Installs to ~/.local/bin and ~/.config/systemd/user/ System mode: Installs to /usr/bin and /usr/lib/systemd/user/ Automatically builds the release binary Reloads systemd daemon Provides clear next-step instructions for enabling and starting the service Color-coded output for better readability 3. Uninstallation Script - [rewrite/scripts/uninstall.sh](vscode-webview://1at842bsak2p6q97kddh3jg9gfr5ql764vt5714hl6ck9n1j1fj6/rewrite/scripts/uninstall.sh) Mirrors the installation script with user/system modes Safely stops and disables the service before removal Removes binary and service files Preserves configuration files in ~/.config/redshift/ 4. Updated Documentation - [rewrite/README.md](vscode-webview://1at842bsak2p6q97kddh3jg9gfr5ql764vt5714hl6ck9n1j1fj6/rewrite/README.md) Added comprehensive installation section with both modes Service management commands (enable, start, stop, status, logs) Troubleshooting guide for common issues Systemd service features and capabilities Configuration notes Key Features ✅ Easy Installation: Single command to build and install ✅ Automatic Startup: Service starts at login when enabled ✅ Auto-Restart: Recovers automatically from crashes ✅ User-Friendly: Clear instructions and color-coded output ✅ Flexible: Supports both user and system-wide installations ✅ Safe Uninstall: Properly cleans up service and binaries ✅ Well Documented: Comprehensive README with troubleshooting The implementation follows Linux best practices for systemd user services and provides a professional installation experience for users.
Sign in to join this conversation.