Startup script problem


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Startup script problem
# 1  
Old 03-23-2016
Startup script problem

The attached file is a copy of my rc.local. The rc.local script appears to execute as the tightvncserver gets started. However the nodemon process does not start. The element nodemon is a symlink to nodemon and the path is correct.

I have a little start script located in the /home/pi/aws_proxy named start that has the same nohup line but just refers to nodemon not /usr/local/lib/nodemon and that works when I run it.

I just can't understand why it will not run from the rc.local file.

Any help appreciated
# 2  
Old 03-23-2016
Output and error messages are redirected to /home/pi/aws_proxy/aws_proxy.log
Anything in there?
# 3  
Old 03-23-2016
Ahhh. Yes the log file contains:

/usr/bin/env: node: No such file or directory

Which is correct the directory env does not exist in /usr/bin. That brings up the question why is it trying to go there? Is it because /usr/local/bin/nodemon is a symlink?

I am not a linux expert, more than a noobie but not an expert so any help tracking this down would be appreciated.

TIA Barry

---------- Post updated at 05:26 PM ---------- Previous update was at 05:16 PM ----------

While there is no directory named env there is a file so named that seems to be some sort of diagnostic entity. It is binary but there is some text in it that is readable having to do with bad options.

Does that provide more clues?
# 4  
Old 03-30-2016
Something runs
Code:
/usr/bin/env ... node

where node is not found.
Perhaps /usr/local/bin/nodemon is a shell script that does it?
Say node is to be found in /usr/local/bin/ then either change the /usr/local/bin/nodemon script to
Code:
/usr/bin/env PATH=${PATH}:/usr/local/bin ... node

Or change /etc/rc.local to
Code:
nohup /usr/bin/env PATH=${PATH}:/usr/local/bin /usr/local/bin/nodemon --watch /home/pi/aws_proxy/app --watch /home/pi/aws_proxy/ir_library --delay 10 /home/pi/aws_proxy/app/main.js > /home/pi/aws_proxy/aws_proxy.log 2>&1 &

And in this particular case it will also find a simple nodemon in the just defined PATH:
Code:
nohup /usr/bin/env PATH=${PATH}:/usr/local/bin nodemon --watch /home/pi/aws_proxy/app --watch  /home/pi/aws_proxy/ir_library --delay 10 /home/pi/aws_proxy/app/main.js  > /home/pi/aws_proxy/aws_proxy.log 2>&1 &

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Problem in UNIX redhat v2.4.7-10 when startup

THE PROBLEM IS: Intializing USB controller (usb-uhci);Hint;insmod errors can be caused by in correct module parameters, including invailid IO or IRQ parsmeter lib /modules/2.4.7-10/kernel/drivers /usb-uhci.o:insmod/lib/modules/2.4.7/10/kernel/driverd/usb/usb-uhci.o failed Checking... (6 Replies)
Discussion started by: Weso
6 Replies

2. Shell Programming and Scripting

Apache tomcat startup script not booting at startup.

I copied the script from an AskUbuntu post - #!/bin/bash ### BEGIN INIT INFO # Provides: tomcat7 # Required-Start: $network # Required-Stop: $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start/Stop Tomcat server ### END INIT INFO ... (14 Replies)
Discussion started by: Hijanoqu
14 Replies

3. Windows & DOS: Issues & Discussions

Windows vista startup problem

I all, I have a problem on my Windows Vista that began afetr the purchase of an external Hard Disk Freecom. A few days afetr the purchase I disconnected it while it was writing and, since that moment, every time I connect and disconnect it, the PC go to freeze mode for 5 minutes. The same... (2 Replies)
Discussion started by: Ubertino
2 Replies

4. Linux

startup problem

Hello: I have a little problem, I have Windows Xp in my desktop, yesterday I installed centos 5. Now when the Pc starts it goes directly to windows and I do not have the option to start centos. Xp and centos are in the same disk. (4 Replies)
Discussion started by: jcpetela
4 Replies

5. BSD

[OpenBSD] DNS startup problem

I have the DNS files set up on my OpenBSD 4.0 amd64 system however when I run named, I get the following error in my logs: Sep 23 10:43:03 grunty named: starting BIND 9.3.2-P1 Sep 23 10:43:03 grunty named: /etc/named.conf:25: change directory to '/var/named' failed: file not found Sep 23... (2 Replies)
Discussion started by: BOFH
2 Replies

6. UNIX for Advanced & Expert Users

How to diagnosis the problem on Solaris 10 for DB startup

I run Oracle 10g on Solaris 10 Sparc machine. I created a dbora file to automatically start Oracle database when UNIX system reboot. I created this dbora file under /etc/init.d, Then link it to /etc/rc0.d/K10dbora and /etc/rc2.d/S99dbora. When I reboot solaris 10 system to test this script. It... (2 Replies)
Discussion started by: duke0001
2 Replies

7. UNIX for Advanced & Expert Users

Irix - startup script problem

Hi there. Sorry if this is in the wrong forum but I guess a moderator can shift it if needed. I've set up a shell script to be run as a user that fires at startup on Solaris and RedHat by adding su - <user> -c <Path_to_Script>/<script>.sh And it works great. Problem is I can't get this to... (0 Replies)
Discussion started by: rshampshire
0 Replies

8. UNIX for Dummies Questions & Answers

databse startup problem

i have oracle database startup problem. i have installed oracle8i(8.1.7) on windowsXP i have configured everything properly but i m unable to start database automatically and for this when i checked services of database it shows starting not started so i have to start it manually.Can u plz tell... (3 Replies)
Discussion started by: vandana
3 Replies

9. UNIX for Dummies Questions & Answers

problem with the startup

I have installed free bsd, and it won't reboot on it. I got win on disk 1 and on disk 2 is free bsd. Is there an optoin tha do so u could choose betwen win or free bsd? Is there an option in the installation that maybe I have missed? (4 Replies)
Discussion started by: Mr.Rudiment
4 Replies
Login or Register to Ask a Question