Can’t create a working init.d for Apache 2.4.2 on CentOS

I built apache 2.4.2 on CentOS from source and now am trying to create an init.d script to go along with it. A friend gave me one script but it never outputted a success or fail and I disliked it. I found in the tar a httpd.init script file. It just needed the location of … Read more

Starting/Stopping Custom PHP Chat Server Linux Service (CentOS)

I have been trying all night to get this service working properly. I created this script from a template and am very new to bash coding. I wrote a fully functioning chat server in php which runs endlessly, but now want to make it a dedicated service. I want to do this so that it … Read more

Centos wont create init.d startup files

recently i installed vnstat on my fresh linux machine. so after installing it with yum install vnstat , before it i installed epel! so now i cant start it: service vnstat start error: unrecognized service i have tired searching a little then i found out that it does not create init.d file to run it. … Read more

How to manually remove php from init

I tried to remove php5-fpm from init (aka upstart) on my Lubuntu OS with the command: sudo update-rc.d -f php5-fpm remove but the symlink is still in /etc/init.d/; indeed php is started at boot. What could have caused this issue, and how can I manually remove it from the boot in such a way that … Read more

init.d script getting error

First of all sorry for my bad english Ok, i wrote a init.d script and i don’t know its true or false (i am new at this things) #!/bin/sh . /etc/init.d/someserver start () { echo -n $”Starting someserver.jar: ” java -jar /home/someserver/someserver.jar & echo $! > /home/someserver/someserver.pid } stop () { echo -n $”Stopping someserver.jar: … Read more

Command shows different results when I login as a user vs su to the user

I’m trying to run a simple command from an init.d script and I’m troubleshooting why the command doesn’t work when I run it from my init.d script but works when I run it as my user. Can someone explain why when I run nvm –version as my logged in user it shows a value, but … Read more