Project

General

Profile

Bug #2019

RedHat 5 initscript condrestart not working

Added by Frederik Nosi over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Packaging
Target version:
Difficulty:
trivial
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

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:

  1. 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 ]; then
    restart
    /etc/init.d/foreman restart
    RETVAL=$?
    fi
    ;;

Associated revisions

Revision 7fdb50e3 (diff)
Added by Dominic Cleal over 9 years ago

fixes #2019 - condrestart error when standalone

Also restarts when configured with Thin.

Revision 32c3420b
Added by Dominic Cleal over 9 years ago

Fixes #2019 - condrestart error when standalone

History

#1 Updated by Dominic Cleal over 9 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

#2 Updated by Dominic Cleal over 9 years ago

  • Status changed from Assigned to Ready For Testing

#3 Updated by Dominic Cleal over 9 years ago

  • Status changed from Ready For Testing to Resolved
  • Target version set to 1.1

Also available in: Atom PDF