add hooks to restart service