Initial commit
This commit is contained in:
13
roles/oracle-db-postinstall/templates/cron_oracle_cleaner.j2
Normal file
13
roles/oracle-db-postinstall/templates/cron_oracle_cleaner.j2
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
/usr/bin/logger -t ora_db_clean_xml "Clean xml file older than 30 days from {{ oracle_base }}/diag/rdbms/"
|
||||
find {{ oracle_base }}/diag/rdbms/ -iname "*xml" -mtime +30 -print -delete | logger -t oracle_clean_xml
|
||||
|
||||
/usr/bin/logger -t ora_lsnr_clean_xml "Clean xml file older than 30 days from {{ oracle_base }}/diag/tnslsnr/"
|
||||
find {{ oracle_base }}/diag/tnslsnr/ -iname "*xml" -mtime +30 -print -delete | logger -t oracle_clean_xml
|
||||
|
||||
/usr/bin/logger -t ora_db_clean_trc "Clean trc file older than 30 days from {{ oracle_base }}/diag/rdbms/"
|
||||
find {{ oracle_base }}/diag/rdbms/ -iname "*trc" -mtime +30 -print -delete | logger -t oracle_clean_trc
|
||||
|
||||
/usr/bin/logger -t ora_db_clean_trm "Clean trm file older than 30 days from {{ oracle_base }}/diag/rdbms/"
|
||||
find {{ oracle_base }}/diag/rdbms/ -iname "*trm" -mtime +30 -print -delete | logger -t oracle_clean_trm
|
||||
15
roles/oracle-db-postinstall/templates/dbora.service.j2
Normal file
15
roles/oracle-db-postinstall/templates/dbora.service.j2
Normal file
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Start Oracle Database
|
||||
After=multi-user.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment=PIDFILE=/run/dbora.pid
|
||||
ExecStart=/usr/bin/su - oracle -c "{{oracle_home}}/bin/dbstart {{oracle_home}}"
|
||||
ExecStop=/usr/bin/su - oracle -c "{{oracle_home}}/bin/dbshut {{oracle_home}}"
|
||||
TimeoutSec=900
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
14
roles/oracle-db-postinstall/templates/logrotate_oracle.j2
Normal file
14
roles/oracle-db-postinstall/templates/logrotate_oracle.j2
Normal file
@@ -0,0 +1,14 @@
|
||||
{{ oracle_base }}/diag/rdbms/*/*/trace/*.log
|
||||
{{ oracle_base }}/diag/tnslsnr/*/*/trace/*.log
|
||||
{
|
||||
su oracle oinstall
|
||||
daily
|
||||
size 100M
|
||||
rotate 6
|
||||
missingok
|
||||
compress
|
||||
notifempty
|
||||
dateext
|
||||
create 0640 oracle oinstall
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user