Posted: Wed Nov 10, 2021 21:11 Post subject: [SOLVED] Running multiple commands
I've have added a second command to my startup command field, but the first command (highlighted) (which have been running fine for years) does not appear to run any more.
Have I added the second command correctly? Do I need some sort of separator?
The general forum is not the best place to ask questions see the second announcement in the top of that forum:
Quote:
STOP!-READ FIRST: This area is NOT for router help! READ!
Furthermore stating buildnumber and router model (probably R7800) is wanted to give optimal support
You say it always worked but was that on your current build or on an earlier build?
It seems you start from /opt presumably from an usb drive/stick?
If so chances are the usb drive is not ready yet when the startup runs.
So as first line try this:
Code:
is-mounted.sh /opt
That runs a script which waits till /opt is ready, alternatively enter:
Code:
sleep 30
I will transfer this thread to a more appropriate forum
Sorry, running Firmware: DD-WRT v3.0-r47618 std (11/05/21) on a R7800, however I dont think that is the issue.
Up till today I was running this command on its own in the startup command, and it was working:
"/opt/YAMon3/startup.sh 10"
I then, today, updated the startup command field to include the vpn-pbr-watchdog script. The watchdog script seems to be running, but the first line in that box (Yamon) is not executed as far as I can see..
So, I now have 2 separate scripts in the startup command field, is that possible, or do I need to add them both into a custom script and only refer that 1 script in the startup command?
So I dont think the issue is related to /opt not being there, etc, as it has always been running.
Joined: 04 Aug 2018 Posts: 1446 Location: Appalachian mountains, USA
Posted: Thu Nov 11, 2021 0:01 Post subject:
I have ten times the material in my Startup window than you have in yours, in six different routers. It's just a big script space. Whatever your problem is, it's not about including a little more material.
I can't really guess what interaction between the original line and the rest might be causing you trouble. I have no idea what the first line does, and while the rest looks like a script I've seen in these parts before, I can't read it clearly either: the imgur image won't load for me, so I only see the thumbnail. I'm pretty nearsighted, but that's kind of at my limit on my small-screen phone! As an alternative, this kind of code block
Code:
you do in this way:
[code]your code here
and here
and here...[/code]
Do experiment with @egc's timing idea. He has more dd-wrt experience than the rest of us put together, and if that experience says timing issues often arise in surprising ways during startup, well... _________________ 2x Netgear XR500 and 3x Linksys WRT1900ACSv2 on 53544: VLANs, VAPs, NAS, station mode, OpenVPN client (AirVPN), wireguard server (AirVPN port forward) and clients (AzireVPN, AirVPN, private), 3 DNSCrypt providers via VPN.
Joined: 08 May 2018 Posts: 14126 Location: Texas, USA
Posted: Thu Nov 11, 2021 3:16 Post subject:
Not like it has not been stated before to use a sleep command of up to 30 seconds for USB stored scripts. The other option is to save just that one line as a USB script... since it should run on mount... _________________ "Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT Pogo - A minimal level of ability is expected and needed... DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)
----------------------
Linux User #377467 counter.li.org / linuxcounter.net
Do experiment with @egc's timing idea. He has more dd-wrt experience than the rest of us put together, and if that experience says timing issues often arise in surprising ways during startup, well...
Im well aware of @egc's expertise, he has helped me out on a number of issues recently.
I will give the sleep command a go when I get home, it might just be that the upgrade to r47618 (from a fairly old build) the very same day has introduced a delay at mapping the USB drive or something...