Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Commit

Permalink
Merge pull request #756
Browse files Browse the repository at this point in the history
edbd134 Testnet: start, stop and destroy webserver (MoroccanMalinois)
  • Loading branch information
anonimal committed Nov 27, 2017
2 parents 5aafe66 + edbd134 commit 365c212
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contrib/testnet/testnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ create_webserver_instance()
local _cmd="sed -i -e 's/#ServerName .*/ServerName ${_web_host}:80/' ${web_system_dir}/${web_conf_dir}/${web_conf} && httpd-foreground"

# Start publisher instance
docker run -dit --rm --network=${KOVRI_NETWORK} --ip=${_web_host} --name $web_name \
docker create -it --rm --network=${KOVRI_NETWORK} --ip=${_web_host} --name $web_name \
$_entrypoint \
-v ${_dest_dir}/${web_root_dir}/:${web_system_dir}/${web_root_dir}/ \
$KOVRI_WEB_IMAGE \
Expand All @@ -553,6 +553,7 @@ create_webserver_instance()

Start()
{
echo -n "Starting web server... " && docker start $web_name
# Start testnet
for _seq in $($sequence); do
local _container_name="${docker_base_name}${_seq}"
Expand All @@ -574,6 +575,7 @@ Stop()
local _stop="docker stop -t $KOVRI_STOP_TIMEOUT"

# Stop testnet
echo -n "Stopping web server... " && $_stop $web_name
for _seq in $($sequence); do
local _container_name="${docker_base_name}${_seq}"
echo -n "Stopping... " && $_stop $_container_name
Expand All @@ -599,6 +601,7 @@ Destroy()

Stop

echo -n "Removing web server... " && docker rm -v $web_name
for _seq in $($sequence); do
local _container_name="${docker_base_name}${_seq}"
echo -n "Removing... " && docker rm -v $_container_name
Expand Down

0 comments on commit 365c212

Please sign in to comment.