Skip to content
This repository was archived by the owner on Nov 21, 2022. It is now read-only.

Commit e91557d

Browse files
author
Archit Sharma
committed
add shutdown and restart scripts
1 parent 86a6a65 commit e91557d

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

restart_sarjitsu

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
3+
APP_CONF=conf/sarjitsu.conf
4+
5+
source $APP_CONF
6+
7+
log(){
8+
echo -e "[$(date +'%D %H:%M:%S %Z')] - $*"
9+
}
10+
11+
log "Attempting to start: $METRICSTORE_CONTAINER_ID"
12+
docker start $METRICSTORE_CONTAINER_ID
13+
14+
log "Attempting to start: $DATASOURCE_CONTAINER_ID"
15+
docker start $DATASOURCE_CONTAINER_ID
16+
17+
log "Attempting to start: $FRONTEND_CONTAINER_ID"
18+
docker start $FRONTEND_CONTAINER_ID
19+
20+
log "Attempting to start: $MIDDLEWARE_CONTAINER_ID"
21+
docker start $MIDDLEWARE_CONTAINER_ID
22+
23+
log "Attempting to start: $BACKEND_CONTAINER_ID"
24+
docker start $BACKEND_CONTAINER_ID

shutdown_sarjitsu

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
APP_CONF=conf/sarjitsu.conf
4+
5+
source $APP_CONF
6+
7+
log(){
8+
echo -e "[$(date +'%D %H:%M:%S %Z')] - $*"
9+
}
10+
11+
log "Attempting to stop backend"
12+
docker stop $BACKEND_CONTAINER_ID
13+
log "Attempting to stop middleware"
14+
docker stop $MIDDLEWARE_CONTAINER_ID
15+
16+
CLEAN_IDS=$(docker ps | grep -e $FRONTEND_CONTAINER_ID \
17+
-e $METRICSTORE_CONTAINER_ID \
18+
-e $DATASOURCE_CONTAINER_ID \
19+
| awk -F' ' '{print $1}')
20+
21+
log "Attempting to stop: [$FRONTEND_CONTAINER_ID $METRICSTORE_CONTAINER_ID $DATASOURCE_CONTAINER_ID]"
22+
23+
docker stop $CLEAN_IDS

0 commit comments

Comments
 (0)