This commit is contained in:
Your Name 2025-04-25 13:15:28 +12:00
parent 0b5fea7b71
commit d88a691b9b
7 changed files with 16 additions and 10 deletions

View File

@ -158,7 +158,7 @@ bool service_runner::install() {
// Run install script // Run install script
{ {
std::string install_cmd = "'cd " + mRemote_service_template_path + std::string install_cmd = "'cd " + mRemote_service_template_path +
" && /bin/bash _install.sh " + mRemote_service_env_file + "'"; " && /bin/bash install.sh " + mRemote_service_env_file + "'";
bool ok= execute_ssh_command(install_cmd, "Failed to run install script"); bool ok= execute_ssh_command(install_cmd, "Failed to run install script");
if (!ok) if (!ok)
return false; return false;
@ -324,7 +324,7 @@ service_runner::HealthStatus service_runner::is_healthy()
} }
// Check if status script exists // Check if status script exists
std::string command = "_status"; std::string command = "status";
if (!template_command_exists(m_service_info.template_name, command)) { if (!template_command_exists(m_service_info.template_name, command)) {
return HealthStatus::UNKNOWN; return HealthStatus::UNKNOWN;
@ -386,7 +386,7 @@ std::vector<int> service_runner::get_ports()
} }
// Check if ports script exists // Check if ports script exists
std::string command = "_ports"; std::string command = "ports";
if (!template_command_exists(m_service_info.template_name, command)) { if (!template_command_exists(m_service_info.template_name, command)) {
return ports; return ports;
} }

View File

@ -1,5 +1,4 @@
# Service settings specific to this server # Service settings specific to this server
TEMPLATE=example
# Application settings # Application settings
CONTAINER_PORT=8181 CONTAINER_PORT=8181

View File

@ -1,6 +1,8 @@
# Template to use - always required!
TEMPLATE=example
# Service settings specific to this server # Service settings specific to this server
# (can also override anything in the _basic.env file in the template to make it specific to this server) # (can also override anything in the _basic.env file in the template to make it specific to this server)
HOST_PORT=80 HOST_PORT=80
LOCAL_DATA_FOLDER="${HOME}/.example" LOCAL_DATA_FOLDER="${HOME}/.example"
IMAGE_TAG="latest" IMAGE_TAG="latest"

View File

@ -1,6 +1,4 @@
# Service settings # Service settings
TEMPLATE=watchtower
CONTAINER_NAME=watchtower CONTAINER_NAME=watchtower
# Interval in seconds between checks. # Interval in seconds between checks.

View File

@ -63,6 +63,10 @@ grey_end() {
} }
create_and_start_container() { create_and_start_container() {
if [ -z "$1" ] || [ -z "$2" ]; then
die "Template error: create_and_start_container <run_cmd> <container_name>"
fi
local run_cmd="$1" local run_cmd="$1"
local container_name="$2" local container_name="$2"

View File

@ -1,6 +1,9 @@
# Service settings # Template to use - always required!
TEMPLATE=watchtower
# Service settings specific to this server
# (can also override anything in the _basic.env file in the template to make it specific to this server)
# Interval in seconds between checks. # Interval in seconds between checks.
# Default is 1800 seconds (30 minutes). # Default is 1800 seconds (30 minutes).
INTERVAL=1800 INTERVAL=1800