i have a shell script which i require to run during boot i have followed the link
Executing a script on startup using BeagleBone Black
by this, the service is getting created but when i check by using systemctl, it is showing failed
can anyone help me
1 Answer 1
I had the same issue last days. Your problem is related to the "Type" field in "[Service]" part. Your are using Type=simple which execute at the beginning without wait for the other resource necessary to use your script. By changing to Type=idle should solve the problem.
idle means that your script will execute after all the service are initiated.
A better approach is by looking the services that your script needs, and also writing the field "After=service_required_by_my_script.service service2_required_by_my_script.service ...and more" in the [Service] part.
Recommended literature:
Arch linux Wiki Systemd (look in "Service types")
Similar problem:
systemctl status startup1.service.