Skip to content

Commit

Permalink
Update rhel9-setup.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
slominskir authored Sep 19, 2023
1 parent 19bb366 commit 92972bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/rhel9-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ systemctl enable wildfly
}

create_log_file_cleanup_cron() {
cat > /root/delete-old-wildfly-logs.sh << EOF
cat > /opt/wildfly/delete-old-wildfly-logs.sh << EOF
#!/bin/sh
if [ -d ${WILDFLY_USER_HOME}/log ] ; then
/usr/bin/find ${WILDFLY_USER_HOME}/log/ -mtime +30 -exec /usr/bin/rm {} \;
fi
EOF
chmod +x /root/delete-old-wildfly-logs.sh
chmod +x /opt/wildfly/delete-old-wildfly-logs.sh
cat > /etc/cron.d/delete-old-wildfly-logs.cron << EOF
0 0 * * * wildfly /root/delete-old-wildfly-logs.sh >/dev/null 2>&1
0 0 * * * wildfly /opt/wildfly/delete-old-wildfly-logs.sh >/dev/null 2>&1
EOF
}

Expand Down

0 comments on commit 92972bd

Please sign in to comment.