Start Script at Boot Up on Raspberry Pi

bootupRaspberry Pisystemd

Guides
https://gauntface.com/blog/2015/12/02/start-up-scripts-for-raspbian

http://www.diegoacuna.me/how-to-run-a-script-as-a-service-in-raspberry-pi-raspbian-jessie/

If you are going to use a network service you may want need to change the [Unit] directives to look something like the NGinx service. See this article for details on how a network service works: https://medium.com/@johannes_gehrs/getting-started-with-systemd-on-debian-jessie-e024758ca63d.

Notice the service is only started After the network.target (After=network.target) event is completed. This is the important distinction.

[Unit]
Description=A high performance web server and a reverse proxy server
After=network.target
[Service]
Type=forking
PIDFile=/run/nginx.pid
ExecStartPre=/usr/sbin/nginx -t -q -g 'daemon on; master_process on;'
ExecStart=/usr/sbin/nginx -g 'daemon on; master_process on;'
ExecReload=/usr/sbin/nginx -g 'daemon on; master_process on;' -s reload
ExecStop=/usr/sbin/nginx -s quit
[Install]
WantedBy=multi-user.target