"/etc/init.d/networking restart" is deprecated

"/etc/init.d/networking restart" has been deprecated for a long time. Ubuntu 14.04 now gives a cryptic error when trying to use it. See https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/1301015

This fix is from https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/1301015/comments/8 and should work on all distros