problem with autorun.sh script

Don't miss a thing. Post your questions and discussion about other uncategorized NAS features here.

problem with autorun.sh script

Postby klaasvaak » Tue Dec 21, 2010 6:20 am

Hi all,

I've got a fairly simple script to run through my "autorun.sh"-file, being
Code: Select all
/opt/MusicIP/MusicMagicMixer/./MusicMagicServer -v start &
wget -O /dev/null http://192.168.1.17:10002/server/add?root=/share/Multimedia/Muziek
The first line starts MusicIP when the QNAP (re)boots, while the second line adds the path pointing at my audio files.

The first line is executed as expected and MusicIP starts when the QNAP boots, but the second line gives no return. Strange enough it will do the job when entering the second line as command, or when file "autorun.sh" is run manually.

clearly I'm missing something, but I have no clue what ... who can help?

many thanks in advance, Klaas
klaasvaak
Starting out
 
Posts: 33
Joined: Fri Dec 10, 2010 3:29 am
NAS Model: TS-459U

Re: problem with autorun.sh script

Postby tmt » Tue Dec 21, 2010 7:08 am

The problem is that /opt is not yet mounted when autorun.sh executes. Or perhaps more accurately, the /opt symlink is not yet set up. Add those lines to /etc/init.d/Optware.sh instead. This script lives in /opt so the change will be persistent, unless of course you uninstall optware.
SS-439, Ubuntu Server 12.04.2 LTS, EXT4, RAID10, 4xHitachi 5K1000
TS-112, 3.7.3 20120801, EXT4, 1xHitachi 7K1000
tmt
Been there, done that
 
Posts: 977
Joined: Mon Nov 16, 2009 11:02 am
NAS Model: SS-439 Pro

Re: problem with autorun.sh script

Postby klaasvaak » Tue Dec 21, 2010 8:36 am

Many thanks for your swift reply, and I tried your suggestion, but the issue is persistent. Again, the first line works, so I assume that /opt is mounted, otherwise the command wouldn't be executed (or am I wrong?).

.. but the second line, doesn't want to be executed ... could this be a permission issue?
klaasvaak
Starting out
 
Posts: 33
Joined: Fri Dec 10, 2010 3:29 am
NAS Model: TS-459U

Re: problem with autorun.sh script

Postby tmt » Tue Dec 21, 2010 10:48 am

Try invoking wget as the full path: /usr/bin/wget ...
SS-439, Ubuntu Server 12.04.2 LTS, EXT4, RAID10, 4xHitachi 5K1000
TS-112, 3.7.3 20120801, EXT4, 1xHitachi 7K1000
tmt
Been there, done that
 
Posts: 977
Joined: Mon Nov 16, 2009 11:02 am
NAS Model: SS-439 Pro

Re: problem with autorun.sh script

Postby klaasvaak » Wed Dec 22, 2010 1:49 am

I tried your suggestion, but no luck I'm afraid ... :cry: ... any idea what else I can try? And is it possible that the second line is already executed before the first line is completed?

and, ... is there a way to view the boot log of the QNAP?

cheers, Klaas
klaasvaak
Starting out
 
Posts: 33
Joined: Fri Dec 10, 2010 3:29 am
NAS Model: TS-459U


Return to Miscellaneous

Who is online

Users browsing this forum: No registered users and 2 guests