dify/docker/startupscripts/init.sh

14 lines
418 B
Bash
Raw Normal View History

#!/usr/bin/env bash
2024-09-08 13:14:11 +08:00
DB_INITIALIZED="/opt/oracle/oradata/dbinit"
#[ -f ${DB_INITIALIZED} ] && exit
#touch ${DB_INITIALIZED}
if [ -f ${DB_INITIALIZED} ]; then
echo 'File exists. Standards for have been Init'
exit
else
2024-09-08 13:14:11 +08:00
echo 'File does not exist. Standards for first time Start up this DB'
"$ORACLE_HOME"/bin/sqlplus -s "/ as sysdba" @"/opt/oracle/scripts/startup/init_user.script";
2024-09-08 13:14:11 +08:00
touch ${DB_INITIALIZED}
fi