Add Windows service host and system tray controller
All checks were successful
CI / test (push) Successful in 7s
All checks were successful
CI / test (push) Successful in 7s
This commit is contained in:
71
README.md
71
README.md
@@ -109,6 +109,77 @@ Or use the PowerShell launcher:
|
||||
.\start_backend.ps1
|
||||
```
|
||||
|
||||
### Windows Service
|
||||
|
||||
Run these from an elevated PowerShell session (Run as Administrator):
|
||||
Requires .NET SDK 10+ (installer publishes a native service host executable).
|
||||
|
||||
Install and start at boot:
|
||||
|
||||
```powershell
|
||||
.\install_backend_service.ps1 -ForceReinstall -StartAfterInstall -DelayedAutoStart
|
||||
```
|
||||
|
||||
Check status:
|
||||
|
||||
```powershell
|
||||
Get-Service -Name ScreenJobBackend
|
||||
```
|
||||
|
||||
Stop/start manually:
|
||||
|
||||
```powershell
|
||||
Stop-Service -Name ScreenJobBackend
|
||||
Start-Service -Name ScreenJobBackend
|
||||
```
|
||||
|
||||
Uninstall:
|
||||
|
||||
```powershell
|
||||
.\uninstall_backend_service.ps1
|
||||
```
|
||||
|
||||
Service logs are written to:
|
||||
|
||||
```text
|
||||
screenjob_runs/service/backend-service.stdout.log
|
||||
screenjob_runs/service/backend-service.stderr.log
|
||||
```
|
||||
|
||||
### System Tray Icon (Windows)
|
||||
|
||||
Start tray icon now:
|
||||
|
||||
```powershell
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -STA -File .\screenjob_tray.ps1
|
||||
```
|
||||
|
||||
Install startup shortcut (current user):
|
||||
|
||||
```powershell
|
||||
.\install_tray_startup_shortcut.ps1
|
||||
```
|
||||
|
||||
Install startup shortcut for all users:
|
||||
|
||||
```powershell
|
||||
.\install_tray_startup_shortcut.ps1 -AllUsers
|
||||
```
|
||||
|
||||
Remove startup shortcut:
|
||||
|
||||
```powershell
|
||||
.\install_tray_startup_shortcut.ps1 -Remove
|
||||
```
|
||||
|
||||
Tray menu actions:
|
||||
|
||||
- Refresh service status
|
||||
- Start/Stop/Restart service (prompts for admin/UAC)
|
||||
- Open dashboard URL from `.env` `SCREENJOB_HOST` / `SCREENJOB_PORT`
|
||||
- Open service logs folder
|
||||
- Exit tray icon process
|
||||
|
||||
Auth for all API routes:
|
||||
|
||||
- `Authorization: Bearer <SCREENJOB_TOKEN>`
|
||||
|
||||
Reference in New Issue
Block a user