I have created a file called svrestart in /home/gab/bin (which is a folder that should be automatically be added to path on startup) which contains:
/etc/init.d/nginx restart
/etc/init.d/php5-fpm restart
Then I did chmod +x svrestart and then I rebooted.
Now if I run svrestart I get a permission denied error because I can't have access to these services. If I run sudo svrestart, on the other hand, I get:
sudo: svrestart: command not found
Because the command is hosted in /home/gab/bin and the root user probably can't find it.
How do I make this work?