forked from chaosbunker/dockerbunker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.sh
More file actions
executable file
·25 lines (19 loc) · 918 Bytes
/
Copy pathinit.sh
File metadata and controls
executable file
·25 lines (19 loc) · 918 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
######
# this file is identical to other service files and should not be edited
# pleas edit your service within service.sh
######
# setup base-directory variable
while true;do ls | grep -q dockerbunker.sh;if [[ $? == 0 ]];then BASE_DIR=$PWD;break;else cd ../;fi;done
# load SERVICE_NAME and SERVICE_NAME dynamically
# from service folder-name
SERVICE_NAME="$(basename $(dirname "$BASH_SOURCE") | tr -cd '[a-z|0-9|\-|\_]')" # tr delets all the other characters)"
PROMPT_SSL=1
# load prior saved dockerbunker and service specific environment variables
declare -a environment=( "data/env/dockerbunker.env" "data/include/init.sh" )
for env in "${environment[@]}";do
[[ -f "${BASE_DIR}"/$env ]] && source "${BASE_DIR}"/$env
done
# load service specific configuration
source "$(dirname "$BASH_SOURCE")/service.sh"
# load common service function after service.sh
source "$BASE_DIR/data/include/init_service_after.sh"