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
;;
Updated by Dominic Cleal about 12 years ago
- Status changed from New to Assigned
- Assignee set to Dominic Cleal
Thanks for the report and patch. I've gone a bit further and submitted this: https://github.com/theforeman/foreman-rpms/pull/19
Updated by Dominic Cleal almost 12 years ago
- Status changed from Assigned to Ready For Testing
Updated by Dominic Cleal almost 12 years ago
- Status changed from Ready For Testing to Resolved
- Target version set to 1.1
Actions