Skip to content

Commit 25c689e

Browse files
authored
Fix tnsnames.ora bug
1 parent cb19152 commit 25c689e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

assets/startup.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
#!/bin/bash
2-
LISTENERS_ORA=/u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
2+
LISTENER_ORA=/u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
3+
TNSNAMES_ORA=/u01/app/oracle/product/11.2.0/xe/network/admin/tnsnames.ora
34

4-
cp "${LISTENERS_ORA}.tmpl" "$LISTENERS_ORA" &&
5-
sed -i "s/%hostname%/$HOSTNAME/g" "${LISTENERS_ORA}" &&
6-
sed -i "s/%port%/1521/g" "${LISTENERS_ORA}" &&
5+
cp "${LISTENER_ORA}.tmpl" "$LISTENER_ORA" &&
6+
sed -i "s/%hostname%/$HOSTNAME/g" "${LISTENER_ORA}" &&
7+
sed -i "s/%port%/1521/g" "${LISTENER_ORA}" &&
8+
cp "${TNSNAMES_ORA}.tmpl" "$TNSNAMES_ORA" &&
9+
sed -i "s/%hostname%/$HOSTNAME/g" "${TNSNAMES_ORA}" &&
10+
sed -i "s/%port%/1521/g" "${TNSNAMES_ORA}" &&
711

812
service oracle-xe start
913

0 commit comments

Comments
 (0)