dudewheresmycode
Posts: 16
Joined: Thu Aug 16, 2012 5:28 am

initctl: command not found

Sun Aug 19, 2012 7:06 pm

I'm trying to write an upstart script for my node.js server. When i try to run

Code: Select all

sudo start myserver
i get:

Code: Select all

-bash: start: command not found
, in addition, can't find initctl either.

Ideas?

bredman
Posts: 1415
Joined: Tue Jan 17, 2012 2:38 pm

Re: initctl: command not found

Sun Aug 19, 2012 7:20 pm

Are you trying to follow some tutorial or instruction?

There is no "start" command as standard in Linux.

dudewheresmycode
Posts: 16
Joined: Thu Aug 16, 2012 5:28 am

Re: initctl: command not found

Tue Aug 21, 2012 6:00 am

Sorry that's my Ubuntu bleeding through.. To be clear, I'm trying to create an upstart script in

Code: Select all

/etc/init/
. In Ubuntu I would use

Code: Select all

initctl
to start / stop the script.

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4257
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: initctl: command not found

Tue Aug 21, 2012 6:34 am

. is not in $path

That is why "start" doesn't work. "sudo ./start myserver" should work.

As for initctl, I've never heard of it, but this is Debian, not Ubuntu. What is it supposed to do? When I was on Ubuntu, I don't think it existed (I may easily be wrong).

User avatar
jojopi
Posts: 3353
Joined: Tue Oct 11, 2011 8:38 pm

Re: initctl: command not found

Tue Aug 21, 2012 7:10 am

"start" and "initctl" and /etc/init are upstart-specific, and debian is using sysvinit by default. The sysvinit equivalent is to put a different kind of file in /etc/init.d and run "sudo service NAME start/stop".

"sudo apt-get install upstart" offers to install upstart and remove sysvinit, but it also warns that this is potentially harmful, so I am not going to try it.

Return to “Raspberry Pi OS”