redhat initscript: move restart block to a function