Initial: Holzleitner Mail-Client (Rust, Windows-Service)
Polling-Client, der beim Backend die noch nicht versendeten ausgelieferten Belege abfragt (GET /admin/delivered-belegnummern), ERPframe per CLI zum Mailversand anstößt (_SV_MAIL_VERSAND) und die Belege anschließend als versendet markiert (POST /admin/mark-mail-sent). Authentifizierung gegen das Backend per X-Admin-Api-Key. Enthält: Config-Laden (config.json, Vorlage config.example.json), Logging, Windows-Service-Wrapper (install-/uninstall-service.ps1). Nicht im Repo (.gitignore): config.json (Secrets: Admin-Key + ERPframe- Passwort), target/, logs/. config.example.json trägt nur Platzhalter. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
20
uninstall-service.ps1
Normal file
20
uninstall-service.ps1
Normal file
@ -0,0 +1,20 @@
|
||||
#Requires -RunAsAdministrator
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Stoppt und entfernt den Dienst "Holzleitner App Mails".
|
||||
#>
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[string]$ServiceName = "HolzleitnerAppMails"
|
||||
)
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$svc = Get-Service -Name $ServiceName -ErrorAction SilentlyContinue
|
||||
if (-not $svc) { Write-Host "Dienst '$ServiceName' existiert nicht."; return }
|
||||
|
||||
if ($svc.Status -ne 'Stopped') {
|
||||
Write-Host "Stoppe Dienst..."
|
||||
Stop-Service -Name $ServiceName -Force
|
||||
}
|
||||
& sc.exe delete $ServiceName | Out-Null
|
||||
Write-Host "Dienst '$ServiceName' entfernt."
|
||||
Reference in New Issue
Block a user