tidying
This commit is contained in:
@ -1,23 +1,3 @@
|
||||
DropShell Template Example
|
||||
|
||||
Shell scripts defined in this folder are run as DropShell commands on the remote server (not locally!).
|
||||
All scripts are passed the directory containing the server-specific service environment (SSSE) as an argument
|
||||
(the environment file, along with any other server and service-specific files, is then in $1/service.env)
|
||||
|
||||
The default SSSE file included when a new service is created is in example/service.env. This must exist,
|
||||
and must at minimum contain the TEMPLATE=<template_name> variable.
|
||||
|
||||
The optional backups script gets a second argument, which is the backup file to create (a single tgz file).
|
||||
|
||||
Mandatory scripts are:
|
||||
- install.sh
|
||||
- uninstall.sh
|
||||
- start.sh
|
||||
- stop.sh
|
||||
|
||||
Optional standard scripts are:
|
||||
- backup.sh
|
||||
- status.sh
|
||||
- ports.sh
|
||||
- logs.sh
|
||||
DropShell agent.
|
||||
|
||||
Required for health checks etc.
|
||||
|
@ -54,7 +54,3 @@ for SERVICE_NAME in ${SERVICE_NAMES}; do
|
||||
echo "${SERVICE_NAME}_HEALTH=${SERVICE_HEALTH}"
|
||||
echo "${SERVICE_NAME}_PORTS=${SERVICE_PORTS}"
|
||||
done
|
||||
|
||||
|
||||
|
||||
|
||||
|
1
templates/dropshell-agent/_default.env
Normal file
1
templates/dropshell-agent/_default.env
Normal file
@ -0,0 +1 @@
|
||||
#
|
@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# START SCRIPT
|
||||
# The start script is required for all templates.
|
||||
# It is used to start the service on the server.
|
||||
# It is called with the path to the server specific env file as an argument.
|
||||
|
||||
|
@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# STATUS SCRIPT
|
||||
# The status script is OPTIONAL.
|
||||
# It is used to return the status of the service (0 is healthy, 1 is unhealthy).
|
||||
# It is called with the path to the server specific env file as an argument.
|
||||
|
||||
exit 0
|
@ -1,7 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# STOP SCRIPT
|
||||
# The stop script is required for all templates.
|
||||
# It is used to stop the service on the server.
|
||||
# It is called with the path to the server specific env file as an argument.
|
||||
|
@ -38,4 +38,4 @@ _remove_container $CONTAINER_NAME || die "Failed to remove container ${CONTAINER
|
||||
bash ./start.sh $1 || die "Failed to start container ${CONTAINER_NAME}"
|
||||
|
||||
echo "Installation of ${CONTAINER_NAME} complete"
|
||||
echo "You can access the service at http://${SERVER}:{HOST_PORT}"
|
||||
echo "You can access the service at http://${SERVER}:${HOST_PORT}"
|
||||
|
@ -6,7 +6,7 @@
|
||||
# It is called with the path to the server specific env file as an argument.
|
||||
|
||||
source "$(dirname "$0")/_common.sh"
|
||||
check_required_env_vars "CONTAINER_NAME" "HOST_PORT" "CONTAINER_PORT" "LOCAL_DATA_FOLDER"
|
||||
check_required_env_vars "CONTAINER_NAME" "HOST_PORT" "LOCAL_DATA_FOLDER"
|
||||
|
||||
[ -d "${LOCAL_DATA_FOLDER}" ] || die "Local data folder ${LOCAL_DATA_FOLDER} does not exist."
|
||||
|
||||
|
@ -12,4 +12,3 @@ _is_container_running $CONTAINER_NAME || die "Service is not running - did not f
|
||||
# || die "Service is not healthy - did not get OK response from /health endpoint."
|
||||
|
||||
echo "Service is healthy"
|
||||
exit 0
|
||||
|
Reference in New Issue
Block a user