[PR #15] [MERGED] Use system utils for commands and services #18

Closed
opened 2026-03-02 11:44:09 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jhd3197/ServerKit/pull/15
Author: @jhd3197
Created: 2/10/2026
Status: Merged
Merged: 2/10/2026
Merged by: @jhd3197

Base: mainHead: dev


📝 Commits (2)

  • 06de896 Use system utils for commands and services
  • 401fd71 chore: bump version to 1.2.81 [skip ci]

📊 Changes

11 files changed (+773 additions, -522 deletions)

View changed files

📝 VERSION (+1 -1)
📝 backend/app/services/deployment_service.py (+3 -6)
📝 backend/app/services/firewall_service.py (+53 -152)
📝 backend/app/services/ftp_service.py (+12 -35)
📝 backend/app/services/nginx_service.py (+23 -84)
📝 backend/app/services/php_service.py (+23 -66)
📝 backend/app/services/python_service.py (+11 -25)
📝 backend/app/services/security_service.py (+56 -101)
📝 backend/app/services/ssl_service.py (+30 -52)
backend/app/utils/system.py (+194 -0)
backend/tests/test_utils_system.py (+367 -0)

📄 Description

Refactor services to use centralized system helpers (ServiceControl, PackageManager, run_privileged, is_command_available) instead of ad-hoc subprocess/os calls. Updated deployment, firewall, ftp, nginx, php, python, security, and ssl services to call the new utilities and added error/timeout handling improvements and package manager abstraction. Added backend/app/utils/system.py implementing the helpers and backend/tests/test_utils_system.py with unit tests. This centralizes privileged command execution and service/package management, simplifying tests and platform differences.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jhd3197/ServerKit/pull/15 **Author:** [@jhd3197](https://github.com/jhd3197) **Created:** 2/10/2026 **Status:** ✅ Merged **Merged:** 2/10/2026 **Merged by:** [@jhd3197](https://github.com/jhd3197) **Base:** `main` ← **Head:** `dev` --- ### 📝 Commits (2) - [`06de896`](https://github.com/jhd3197/ServerKit/commit/06de89617524e7d8d6d3da3fe929f52cfb2c17f7) Use system utils for commands and services - [`401fd71`](https://github.com/jhd3197/ServerKit/commit/401fd71402b2dddd7196e6ba117081160003c9a5) chore: bump version to 1.2.81 [skip ci] ### 📊 Changes **11 files changed** (+773 additions, -522 deletions) <details> <summary>View changed files</summary> 📝 `VERSION` (+1 -1) 📝 `backend/app/services/deployment_service.py` (+3 -6) 📝 `backend/app/services/firewall_service.py` (+53 -152) 📝 `backend/app/services/ftp_service.py` (+12 -35) 📝 `backend/app/services/nginx_service.py` (+23 -84) 📝 `backend/app/services/php_service.py` (+23 -66) 📝 `backend/app/services/python_service.py` (+11 -25) 📝 `backend/app/services/security_service.py` (+56 -101) 📝 `backend/app/services/ssl_service.py` (+30 -52) ➕ `backend/app/utils/system.py` (+194 -0) ➕ `backend/tests/test_utils_system.py` (+367 -0) </details> ### 📄 Description Refactor services to use centralized system helpers (ServiceControl, PackageManager, run_privileged, is_command_available) instead of ad-hoc subprocess/os calls. Updated deployment, firewall, ftp, nginx, php, python, security, and ssl services to call the new utilities and added error/timeout handling improvements and package manager abstraction. Added backend/app/utils/system.py implementing the helpers and backend/tests/test_utils_system.py with unit tests. This centralizes privileged command execution and service/package management, simplifying tests and platform differences. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 11:44:09 +03:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ServerKit#18
No description provided.