docs: Update 2 files
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user