Actions
Bug #2019
closedRedHat 5 initscript condrestart not working
Description
I noticed that a day after foreman has been started the log file gets deleted and not replaced. Torned out the logrotate script was rotatinng the log correctly and then calling the initscript with condrestart:
file /etc/logrotate.d/foreman:
[...]
postrotate
[ -e /etc/init.d/foreman ] && /etc/init.d/foreman condrestart >/dev/null 2>&1 || true
[...]
but condrestart wasn't working as expected. This fixes it for me:
- diff
u /root/foreman /etc/init.d/foreman/root/foreman 2012-12-06 13:10:47.000000000 0100
--
++ /etc/init.d/foreman 2012-12-06 13:11:06.000000000 0100@ -134,7 +134,7
@
;;
condrestart)
if [f ${FOREMAN_HOME}/tmp/pids/server.pid ]; thenrestart
/etc/init.d/foreman restart
RETVAL=$?
fi
;;
Actions