Reputation
Top tag
Next privilege 200 Rep.
See reduced ads
Badges
9
Newest
 Caucus
Impact
~943 people reached

Aug
31
awarded  Caucus
Jun
17
comment How to set a binary to init on boot like Apache does (run as a service)
Ok, I will look into that soon. Thanks!
Jun
17
comment How to set a binary to init on boot like Apache does (run as a service)
Yeah, I figured out the "do_start" thing after posted the comment. My call is set to create a pidfile already. Here is the line "start-stop-daemon --background --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \"
Jun
17
awarded  Commentator
Jun
17
awarded  Scholar
Jun
17
comment How to set a binary to init on boot like Apache does (run as a service)
I wish I could have two selected answers because this helped get it into the proper run levels.
Jun
17
accepted How to set a binary to init on boot like Apache does (run as a service)
Jun
17
comment How to set a binary to init on boot like Apache does (run as a service)
I stand corrected sir. After thinking about it some more I finally understood what you meant. You meant to add "--background" in the init script as one of the parameters for the "start-stop-daemon" call. That call is listed in 5 different places in the skeleton script. So I just added it to the ones that had "--start" and BAM! it works. Thanks!!!
Jun
17
comment How to set a binary to init on boot like Apache does (run as a service)
However, if I add "2>&1>/dev/null &" to the call I make directly from the terminal (so "sudo /etc/init.d/phantomjs start 2>&1>/dev/null &") then it backgrounds it. But I am concerned that this won't happen on boot of the server.
Jun
17
comment How to set a binary to init on boot like Apache does (run as a service)
I tried running it like this "/etc/init.d/phantomjs start --background" and that didn't push it to the background. I have also tried adding "2>&1>/dev/null &" to the DAEMON_ARGS with no luck.
Jun
15
awarded  Student
Jun
14
comment How to set a binary to init on boot like Apache does (run as a service)
I also still need to figure out how to launch this like you would Apache where it launches the service in the background and gives you back a success or failure and then returns you to the prompt.
Jun
14
comment How to set a binary to init on boot like Apache does (run as a service)
Lol, ok actually I found out that it works better if you run "update-rc.d phantomjs defaults" first and then run "update-rc.d phantomjs enable". I still get the errors, but now it removes and recreates links. And I admit that I wrote this script. But this is my very first time writing an init script.
Jun
14
comment How to set a binary to init on boot like Apache does (run as a service)
When I run that I get "update-rc.d: warning: phantomjs start runlevel arguments (none) do not match LSB Default-Start values (2 3 4 5)". I am trying to figure out what that means.
Jun
14
asked How to set a binary to init on boot like Apache does (run as a service)
Jun
13
awarded  Excavator
Jun
13
awarded  Editor
Jun
13
revised How to run a command multiple times?
You shouldn't put the word "function" in front of the declaration. It is invalid and will create errors upon reboot if you put this in your ".profile" or ".bashrc". Ref - http://viralpatel.net/blogs/writing-functions-in-shell-script/
Jun
13
suggested approved edit on How to run a command multiple times?
Nov
4
awarded  Supporter