there are several typos, some style issues and now there is at most one service restart in all cases. Submitted by: pedro <git2021@cas.cat>