app: set config to non-nil when there are no hooks in the yaml

Related to #347.
app: call restart:before and restart:after on Restart

Related to #347.