mirror of
https://github.com/aljazceru/cyphernode.git
synced 2025-12-17 04:35:14 +01:00
Now possible to start/stop with ./othercn/dist/start.sh
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
. ./.cyphernodeconf/installer/config.sh
|
||||
current_path="$(cd "$(dirname "$0")" >/dev/null && pwd)"
|
||||
|
||||
. ${current_path}/.cyphernodeconf/installer/config.sh
|
||||
|
||||
# be aware that randomly downloaded cyphernode apps will have access to
|
||||
# your configuration and filesystem.
|
||||
@@ -14,7 +16,7 @@ start_apps() {
|
||||
local APP_START_SCRIPT_PATH
|
||||
local APP_ID
|
||||
|
||||
for i in $current_path/apps/*
|
||||
for i in ${current_path}/apps/*
|
||||
do
|
||||
APP_SCRIPT_PATH=$(echo $i)
|
||||
if [ -d "$APP_SCRIPT_PATH" ] && [ ! -f "$APP_SCRIPT_PATH/ignoreThisApp" ]; then
|
||||
@@ -58,8 +60,6 @@ fi
|
||||
export USER=$(id -u <%= default_username %>):$(id -g <%= default_username %>)
|
||||
<% } %>
|
||||
|
||||
current_path="$(cd "$(dirname "$0")" >/dev/null && pwd)"
|
||||
|
||||
# Let's make sure the container readyness files are deleted before starting the stack
|
||||
docker run --rm -v cyphernode_container_monitor:/container_monitor alpine sh -c 'rm -f /container_monitor/*_ready'
|
||||
|
||||
@@ -80,4 +80,4 @@ else
|
||||
printf " It's pretty fast!\r\n"
|
||||
fi
|
||||
|
||||
. ./testdeployment.sh
|
||||
. ${current_path}/testdeployment.sh
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
current_path="$(cd "$(dirname "$0")" >/dev/null && pwd)"
|
||||
|
||||
|
||||
# be aware that randomly downloaded cyphernode apps will have access to
|
||||
# your configuration and filesystem.
|
||||
# !!!!!!!!! DO NOT INCLUDE APPS WITHOUT REVIEW !!!!!!!!!!
|
||||
@@ -15,7 +14,7 @@ stop_apps() {
|
||||
local APP_START_SCRIPT_PATH
|
||||
local APP_ID
|
||||
|
||||
for i in $current_path/apps/*
|
||||
for i in ${current_path}/apps/*
|
||||
do
|
||||
APP_SCRIPT_PATH=$(echo $i)
|
||||
if [ -d "$APP_SCRIPT_PATH" ] && [ ! -f "$APP_SCRIPT_PATH/ignoreThisApp" ]; then
|
||||
@@ -46,7 +45,7 @@ stop_apps() {
|
||||
done
|
||||
}
|
||||
|
||||
. ./.cyphernodeconf/installer/config.sh
|
||||
. ${current_path}/.cyphernodeconf/installer/config.sh
|
||||
stop_apps
|
||||
|
||||
export USER=$(id -u):$(id -g)
|
||||
@@ -54,5 +53,5 @@ export USER=$(id -u):$(id -g)
|
||||
<% if (docker_mode == 'swarm') { %>
|
||||
docker stack rm cyphernode
|
||||
<% } else if(docker_mode == 'compose') { %>
|
||||
docker-compose -p cyphernode -f $current_path/docker-compose.yaml down
|
||||
docker-compose -p cyphernode -f ${current_path}/docker-compose.yaml down
|
||||
<% } %>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
. ./.cyphernodeconf/installer/config.sh
|
||||
current_path="$(cd "$(dirname "$0")" >/dev/null && pwd)"
|
||||
|
||||
. ${current_path}/.cyphernodeconf/installer/config.sh
|
||||
|
||||
# be aware that randomly downloaded cyphernode apps will have access to
|
||||
# your configuration and filesystem.
|
||||
@@ -17,7 +19,7 @@ test_apps() {
|
||||
local TRAEFIK_HTTP_PORT=<%= traefik_http_port %>
|
||||
local TRAEFIK_HTTPS_PORT=<%= traefik_https_port %>
|
||||
|
||||
for i in $current_path/apps/*
|
||||
for i in ${current_path}/apps/*
|
||||
do
|
||||
APP_SCRIPT_PATH=$(echo $i)
|
||||
if [ -d "$APP_SCRIPT_PATH" ]; then
|
||||
@@ -37,7 +39,7 @@ test_apps() {
|
||||
fi
|
||||
fi
|
||||
done
|
||||
return $returncode
|
||||
return ${returncode}
|
||||
}
|
||||
|
||||
<% if (run_as_different_user) { %>
|
||||
@@ -51,8 +53,6 @@ fi
|
||||
export USER=$(id -u <%= default_username %>):$(id -g <%= default_username %>)
|
||||
<% } %>
|
||||
|
||||
current_path="$(cd "$(dirname "$0")" >/dev/null && pwd)"
|
||||
|
||||
# Will test if Cyphernode is fully up and running...
|
||||
docker run --rm -it -v $current_path/testfeatures.sh:/testfeatures.sh \
|
||||
-v <%= gatekeeper_datapath %>:/gatekeeper \
|
||||
@@ -60,9 +60,9 @@ docker run --rm -it -v $current_path/testfeatures.sh:/testfeatures.sh \
|
||||
-v cyphernode_container_monitor:/container_monitor:ro \
|
||||
--network cyphernodenet eclipse-mosquitto:<%= mosquitto_version %> /testfeatures.sh
|
||||
|
||||
if [ -f $current_path/exitStatus.sh ]; then
|
||||
. $current_path/exitStatus.sh
|
||||
rm -f $current_path/exitStatus.sh
|
||||
if [ -f ${current_path}/exitStatus.sh ]; then
|
||||
. ${current_path}/exitStatus.sh
|
||||
rm -f ${current_path}/exitStatus.sh
|
||||
fi
|
||||
|
||||
if [ "$EXIT_STATUS" -ne "0" ]; then
|
||||
|
||||
Reference in New Issue
Block a user