What's new

Startup scripts do not start after restart system

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Greeno

Regular Contributor
For some time after the system restart (reboot) ceased to run startup scripts (jffs/start-services).

I tried to increase the delay in scripts for a long time (sleep 120), but the problem is not solved.

Do not start the openvpn server.

The problem ceases only when logged on to the webserver and re-run the USB applications.

Otherwise, I have to manually start all services from the console.

How to check and fix the problem.
 
Try with: "services-start"
/jffs/scripts/services-start
and: chmod a+rx /jffs/scripts/services-start
 
My mistake, so as you wrote (/jffs/scripts/services-start). I wrote from memory.
Paths and permissions are okay. Everything worked but some time has stopped working.
 
One thing that can cause this problem is if you edited the script and saved it in DOS/WIN format instead of with Linux line endings. Run

dos2unix /jffs/scripts/services-start
 
My mistake, so as you wrote (/jffs/scripts/services-start). I wrote from memory.
Paths and permissions are okay. Everything worked but some time has stopped working.
Then you have to look over what you have inside your script.
 
Contents Script is fine.
I run the script manually from the console.
Do not start when booting the system.
 
If you are starting something off a USB stick, try putting it in post-mount instead. IIRC, services-start runs before the USB drives mount.

Edit: See this by kvic:
http://www.snbforums.com/threads/syncthing-ac68u.27030/#post-207695

On my 87U, ab-solution and pixelserv weren't starting when run from services-start, but do when run from post-mount.
 
Contents Script is fine.
I run the script manually from the console.
Do not start when booting the system.
That's part of the symptom....but if you don't want to try, that's up to you.
 
"John9527" with encoding no problem, for years i use "vi" in the console or notepad++.

I have connected the hard drive - 3 terabytes. In the mounting no problem. For the test i set the script to run with a delay of 10 minutes (sleep 600), yet the service is not launched. The disk is mounted quickly, check the console immediately after the restart.
 
Check the syslog for a line like the following

custom script: Running /jffs/scripts/services-start

to make sure it's finding the script. It that line is there, there is an error in your script.
 

Similar threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top