redhat initscript: move restart block to a function

This ensures the "condrestart" option will work.