We're using our own script to shutdown oracle database via a script that is resides as pre-command ... this works without any problems.
post-command has those lines above ... and only startup nomount line does not work ... to testing it's progress i put some lines like echo that points on which step it is.
ADDITION: "startup nomount" works on oracle 10g databases but not working on oracle 11g databases. This gives an instruction to solve this problem, thank you so much.
echo "
spool $LOG_DIR/$DB_SID"test1.spl"
startup nomount;
spool off
exit;
" > $LOG_DIR/$DB_SID"test2.sql"
echo "
#!/bin/bash
cd /home/$ORA_USER
. /home/$ORA_USER/.bash_profile
export ORACLE_SID=$DB_SID
env
sqlplus "/ as sysdba" @$LOG_DIR/$DB_SID"test2.sql"
" > $SH_DIR/$DB_SID"test3.sh"
chmod 777 $SH_DIR/$DB_SID"dene3.sh" $LOG_DIR/$DB_SID"dene2.sql"
sudo -u $ORA_USER sh $SH_DIR/$DB_SID"dene3.sh" >> /tmp/log_test3_from_fkm_mount.txt