-
Notifications
You must be signed in to change notification settings - Fork 14
/
module
executable file
·43 lines (36 loc) · 1.02 KB
/
module
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
#
# Run the module command inside a stand-alone container.
#
# Requires that the main IdP container is *not* running.
#
# Changes to the script's directory while running, to set up
# the local volume mount, but runs the command inside the
# container in the IdP's working directory. It is therefore
# easiest to run this script *from* the directory that becomes
# the IdP's working directory.
#
#
# Derive directory containing this script.
#
DIR=$(dirname "${BASH_SOURCE[0]}")
#
# Pick up utility scripts and configuration.
#
. ${DIR}/VERSIONS
. ${DIR}/script-functions
# Home of the IdP *within* the container.
IDP_HOME=/opt/shibboleth-idp
container=$(containerName)
if [ ! -z "${container}" ]; then
echo "The IdP is already running in ${container}."
echo "It must be stopped before you run this command."
exit 1
fi
pushd ${DIR}
docker run --rm -it --name="shibboleth-idp-admin" \
-v `pwd`/shibboleth-idp:/opt/shibboleth-idp \
--workdir="${IDP_HOME}" \
${IMAGE_NAME} \
bin/module.sh $*
# End.