Some checks failed
CI/CD Pipeline / Code Format (push) Has been cancelled
CI/CD Pipeline / Clippy Lints (push) Has been cancelled
CI/CD Pipeline / Unit Tests (push) Has been cancelled
CI/CD Pipeline / Security Audit (push) Has been cancelled
CI/CD Pipeline / Build Release (x86_64-unknown-linux-gnu) (push) Has been cancelled
CI/CD Pipeline / Build Ubuntu Package (push) Has been cancelled
Phase 2: Core API Development - 15 REST API endpoints (packages, patches, system, jobs, websocket) - mTLS authentication layer (src/auth/mtls.rs) - IP whitelist enforcement (src/auth/whitelist.rs) - Job manager with async operation support - WebSocket streaming for job status Phase 3: Security Hardening - Security testing: 16/16 tests passing - Fuzz testing: 21 tests, all findings resolved - Threat model validation (STRIDE matrix) - TLS binding fix (critical vulnerability resolved) - Security documentation complete Phase 4: Production Readiness - Performance benchmarking (all targets met) - Package creation (.deb/.rpm structures) - Documentation (README, API docs, deployment guide) - Security hardening (6 vulnerabilities fixed) Deliverables: - API_DOCUMENTATION.md (889 lines) - DEPLOYMENT_GUIDE.md (733 lines) - SECURITY.md (346 lines) - README.md (525 lines) - debian/ package structure - linux-patch-api.spec (RPM) - install.sh installer script - benches/api_benchmarks.rs - Multiple security/performance reports Security Status: 0 vulnerabilities remaining Test Coverage: 31 unit tests, 21 integration tests Build Status: Release optimized
34 lines
873 B
Bash
Executable File
34 lines
873 B
Bash
Executable File
#!/bin/bash
|
|
# prerm script for linux-patch-api
|
|
# Created by package build system
|
|
|
|
set -e
|
|
|
|
# Stop the service before removal/upgrade
|
|
if [ "$1" = "remove" ] || [ "$1" = "upgrade" ]; then
|
|
echo "Stopping linux-patch-api service..."
|
|
|
|
if systemctl is-active --quiet linux-patch-api.service; then
|
|
systemctl stop linux-patch-api.service
|
|
echo "Service stopped successfully"
|
|
else
|
|
echo "Service was not running"
|
|
fi
|
|
|
|
# Disable the service
|
|
if systemctl is-enabled --quiet linux-patch-api.service 2>/dev/null; then
|
|
systemctl disable linux-patch-api.service
|
|
echo "Service disabled"
|
|
fi
|
|
fi
|
|
|
|
# Handle failed upgrade
|
|
if [ "$1" = "failed-upgrade" ]; then
|
|
echo "Upgrade failed - attempting to restore previous state"
|
|
# Previous version should handle restoration
|
|
fi
|
|
|
|
echo "Pre-removal script completed"
|
|
|
|
exit 0
|