Adding pre_restart action hook