docs: Update 2 files
All checks were successful
Build-Test-Publish / build (linux/amd64) (push) Successful in 24s
Build-Test-Publish / build (linux/arm64) (push) Successful in 56s

This commit is contained in:
j
2026-01-03 00:04:10 +13:00
parent 0f76caa0c8
commit 8bff8a739f
2 changed files with 88 additions and 0 deletions

View File

@@ -7,6 +7,8 @@
#include "services.hpp"
#include "utils/output.hpp"
#include <filesystem>
namespace dropshell
{
@@ -96,6 +98,22 @@ namespace dropshell
return false;
}
// Check if the template supports check-config
LocalServiceInfo service_info = get_service_info(server, service);
if (!SIvalid(service_info))
{
error << "Service " << service << " not found on server " << server << std::endl;
return false;
}
std::filesystem::path script_path = std::filesystem::path(service_info.local_template_path) / "check-config.sh";
if (!std::filesystem::exists(script_path))
{
info << "Template '" << service_info.template_name << "' does not support the check-config command." << std::endl;
debug << "To add support, create: " << script_path.filename().string() << std::endl;
return false;
}
// Sync configuration to remote
info << "Syncing configuration for " << service << " on " << server << "..." << std::endl;
if (!shared_commands::rsync_service_config(server_env, service, false))
@@ -156,6 +174,22 @@ namespace dropshell
return false;
}
// Check if the template supports reload-config
LocalServiceInfo service_info = get_service_info(server, service);
if (!SIvalid(service_info))
{
error << "Service " << service << " not found on server " << server << std::endl;
return false;
}
std::filesystem::path script_path = std::filesystem::path(service_info.local_template_path) / "reload-config.sh";
if (!std::filesystem::exists(script_path))
{
info << "Template '" << service_info.template_name << "' does not support the reload-config command." << std::endl;
debug << "To add support, create: " << script_path.filename().string() << std::endl;
return false;
}
// Sync configuration to remote
info << "Syncing configuration for " << service << " on " << server << "..." << std::endl;
if (!shared_commands::rsync_service_config(server_env, service, false))