Fixed service restart function to use sudo