-
Notifications
You must be signed in to change notification settings - Fork 2
/
apex_backup_validations.sh
56 lines (47 loc) · 1.37 KB
/
apex_backup_validations.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
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
OOS_AB_CONFIG_VALID=Y
echo;
if [ -z "$OOS_AB_ORACLE_SID" ]; then
echo "Missing: OOS_AB_ORACLE_SID";
OOS_AB_CONFIG_VALID=N
fi
if [ -z "$OOS_AB_ORACLE_USERNAME" ]; then
echo "Missing: OOS_AB_ORACLE_USERNAME";
OOS_AB_CONFIG_VALID=N
fi
if [ -z "$OOS_AB_ORACLE_PASSWORD" ]; then
echo "Missing: OOS_AB_ORACLE_PASSWORD";
OOS_AB_CONFIG_VALID=N
fi
if [ -z "$OOS_AB_TNS_PORT" ]; then
echo "Missing: OOS_AB_TNS_PORT";
OOS_AB_CONFIG_VALID=N
fi
if [ -z "$OOS_AB_ORACLE_HOST" ]; then
echo "Missing: OOS_AB_ORACLE_HOST";
OOS_AB_CONFIG_VALID=N
fi
if [ -z "$OOS_AB_APEX_EXPORT_JAVA_DIR" ]; then
echo "Missing: OOS_AB_APEX_EXPORT_JAVA_DIR"
OOS_AB_CONFIG_VALID=N
else
if [ ! -d "$OOS_AB_APEX_EXPORT_JAVA_DIR" ]; then
echo "OOS_AB_APEX_EXPORT_JAVA_DIR: Path does not exist"
OOS_AB_CONFIG_VALID=N
elif [ ! -f "$OOS_AB_APEX_EXPORT_JAVA_DIR/oracle/apex/APEXExport.class" ]; then
echo "APEXEport.class file not found in $OOS_AB_APEX_EXPORT_JAVA_DIR"
OOS_AB_CONFIG_VALID=N
fi
fi
if [ ! -d "$OOS_AB_BACKUP_DIR" ]; then
echo "OOS_AB_BACKUP_DIR: Path does not exist"
OOS_AB_CONFIG_VALID=N
fi
if [ ! -d "$ORACLE_HOME" ]; then
echo "ORACLE_HOME: Path does not exist"
OOS_AB_CONFIG_VALID=N
fi
if [ -z "$OOS_AB_CLASSPATH_OJDBC5" ]; then
echo "Error: Could not find path to ojdbc5.jar. Check ORACLE_HOME ($ORACLE_HOME) configuration";
OOS_AB_CONFIG_VALID=N
fi