-
Notifications
You must be signed in to change notification settings - Fork 3
/
sync_ldap.sh
45 lines (36 loc) · 1.14 KB
/
sync_ldap.sh
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
44
45
#!/usr/bin/env bash
# --------------------------------------------------------------
# ---------------------------- ARGS ----------------------------
# --------------------------------------------------------------
source ./common.sh
export ENV_FILE=./env
echo "${BLUE}PARSE ARGS"
for i in "$@"; do
case $i in
-e=* | --env=*)
export ENV_FILE="${i#*=}"
echo "${CYAN}USE CUSTOM ENV FILE"
shift
;;
-h | --help)
echo "
Usage:
sync_ldap.sh [options]
Flags:
-e, --env=ENV_FILE Set custom env file, must be the same as the env used with build.sh
-h, --help Show this help
"
exit 0
;;
*)
echo "${ERROR}Invalid flag ${i} // Use -h or --help to print help"
exit 1
;;
esac
done
# --------------------------------------------------------------
# ---------------------------- MAIN ----------------------------
# --------------------------------------------------------------
source_env ${ENV_FILE}
echo "${GREEN}SYNC LDAP"
dc exec zou-app zou sync-with-ldap-server