The init.d directory contains a number of start/stop scripts for various services on a Linux system.

learn more… | top users | synonyms

2
votes
0answers
115 views

How to check validity of LSB init scripts?

I'm wondering whether there's any way to check my LSB init scripts for validity? For example whether there are circular runtime dependencies that may prevent my system from shutting down or starting ...
2
votes
1answer
585 views

Starting a service only after another one is completely started (on CentOS)

I have installed on my CentOS server postgresql service and another one called netnfork. The 'netnfork' service starts only after postgresql starts. netnfork init script: #!/bin/sh # # netnfork init ...
1
vote
1answer
645 views

elasticsearch @ debian6 started by /etc/init.d max_file_descriptors

I have installed elasticsearch @ debian6 by this tutorial. I have set up my system max open files directives so i have these values: # su # cat /proc/sys/fs/file-max 70000 # ulimit -Hn 64000 # ...
2
votes
3answers
870 views

Which services to disable on a CentOs 5.8 web/database server?

I have just setup my CentOS 5.8 64 [final] server as a webserver. Specs: 2x E5620 Intel CPU, DDR3 RAM, Hardware Adaptec RAID 10, 4x SAS drives. I have installed myself: Nginx PHP-FPM MySQL ...
0
votes
1answer
132 views

template / platform for linux shell scripts to init.d scripts

So I got a number of small cronjobs, that needs to run more frequent then a minute. So what I usually do is - create shell script with a while loop and sleep statements in it. And then I run it in a ...
1
vote
3answers
4k views

When are scripts inside etc/profile.d executed?

I added some scripts from root inside etc/profile.d to execute at startup time. But when will these scripts be executed if I login into system as a non root user? I want to start LDAP-server at ...
1
vote
1answer
757 views

Difference between two ways of installing tomcat as a service (Linux)

I am installing tomcat on a linux server, and would want it to be available as a service. I have found two different ways to achieve this. The first one is to copy the daemon.sh from ...
0
votes
2answers
822 views

howto remove udev from centos(lxc-guest) without dependencies

i downloaded a openvz template for my lxc server to create a new centos 6.3 guest. Now the guest is not starting because udev is hanging in the boot process. Last time i didn't had this problem but ...
1
vote
1answer
199 views

Backup broken PostgreSQL 8.4 without pg_dump

So. I have a problem. PostgreSQL 8.4 won't start or restart without any output given. But it worked for 3 monthes until hosting provider doesn't rebooted server. Now it is completly broken. It wan't ...
0
votes
2answers
315 views

Apache not restarting properly

I got some problems restarting Apache with 2000 virtual hosts. I use Apache 2.2.22 + PHP 5.4.6 on CentOS 5.8 64-bit. When I try to restart it displays this: /etc/init.d/httpd restart Stopping ...
2
votes
1answer
4k views

How to restart postgresql 8.4 on Debian Squeeze when there are no clusters defined?

How to restart postgresql 8.4 on Debian Squeeze? /etc/init.d/postgresql stop/start/restart does nothing (no output given).
0
votes
2answers
763 views

Chroot on startup

I have a script that runs on startup, but it wont launch a application in chroot. #!/bin/sh /usr/sbin/chroot /root/chrootdir/ /bin/sh -c "lighttpd -f /etc/lighttpd.conf -m /lib" echo "script ...
1
vote
2answers
1k views

init.d script not working?

I copied an init script from here quite some time ago to automatically start my tightvncserver at boot. It worked perfectly at the time. Since then, I have reformatted my computer, and now my script ...
0
votes
1answer
941 views

Can't start Hadoop from an init.d script

I'm using CentOS 6.2. I'm trying to start Hadoop from an init.d script, but it's failing. This is what I see in boot.log : Retrigger failed udev events [ OK ] ...
-2
votes
3answers
1k views

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 ...
0
votes
1answer
68 views

Call REST on shutdown

I would like to know whats the best way to call a REST web service when a Linux server is shutting down.
0
votes
1answer
106 views

Prompt to user during startup on Debian

I need to write a script which prompts information to the user in case of an error. Is it possible to do it using /etc/init.d scripts + update-rc.d? Is there any other way? Thanks for your ...
1
vote
2answers
132 views

Why is there a /etc/init.d/mysql file on this Slackware machine? How could it have gotten there? [closed]

A client of my IT-consulting service owns a web-development shop. He's been having problems with a Slackware 12.0 server running MySQL 5.0.67. The machine was set up by the client's sysadmin, who left ...
7
votes
2answers
4k views

How to remove/backup script from /etc/init.d/?

I've been working with linux for a while but in a rather simple manner. I understand that scripts in init.d are executed when the os starts but how exactly does it works? What if I want to keep a ...
4
votes
2answers
156 views

How does the operating system know which parameter to pass to /etc/init.d/ ?

I've been working with linux for a while but in a rather simple manner. I understand that scripts in init.d are executed when the os starts but how exactly does it works? How does the os know which ...
3
votes
1answer
947 views

Cannot get Nginx to start on boot with Ubuntu

I'm running Ubuntu 12.04 and Nginx 1.2.1 which I compiled from source. I tried the below commands to get nginx to start on boot: $ sudo update-rc.d nginx default $ sudo update-rc.d nginx enable 2345 ...
1
vote
4answers
3k views

Init.d script works when run manually, but not on reboot

I'm trying to setup a RhodeCode server on Ubuntu 12.04. I have everything installed into a virtualenv, and everything works properly when I run it from the console (paster serve production.ini). I ...
3
votes
2answers
119 views

Sensitive data in init scripts

I'm adapting some examples I've found by Googling to build an init script to run a VirtualBox OSE virtual machine as a daemon. I would like to specify a password for VNC access to the VM, and this ...
0
votes
5answers
858 views

Weird init script issue with corosync

This probably has a simple explanation, but I certainly can't think of it. I've got corosync installed (via yum), with it's default init script. Something is strange on this particular CentOS ...
0
votes
1answer
545 views

Mysql server doesn't start at boot on Ubuntu 10.04LTS VPS

I did a apt-get update & installed few updates on my server which runs 10.04LTS. But this has broken mysql. it doesn't start at boot. I tried to manually start it using the following commands: $ ...
2
votes
1answer
2k views

placing shell script under systemd control

Assuming I have a shell script like this:- #!/bin/sh # cherrypy_server.sh PROCESSES=10 THREADS=1 # threads per process BASE_PORT=3035 # the first port used # you need to make the PIDFILE dir and ...
3
votes
2answers
478 views

Ubuntu: How to set up an init script that only runs on the first boot?

I need to install an init script that only runs on the first boot after it's installation. How can I accomplish that on Ubuntu?
1
vote
1answer
322 views

Running multiple background Java processes on Linux

I have a jar file that runs continuously and acts on various events. I need to create multiple instances of this jar, passing parameters to it on start up, and have it continue to run between shell ...
3
votes
2answers
1k views

Init script & the green [ OK ]

I am trying to install fast-cgi for nginx on an EC2 instance. I followed the steps explained here, but that is meant for Debian and does not work out of the box for a red-hat based system. I modified ...
0
votes
1answer
79 views

Process started from init.d takes a long time

I have a wget https://url request that i want to launch from a daemon started from /etc/init.d If launched from /etc/init.d, it will take approximately 10 times longer than if i launch it from a ...
0
votes
1answer
715 views

Both nginx and php5-fpm init.d startup scripts are non-functional and returning no errors..? But they used to work perfectly

I have been using nginx and php5-fpm on my Ubuntu box for a while now. Everything has been configured and setup correctly, and it ran like a charm. I have been keeping the packages updated & ...
2
votes
1answer
270 views

Fabric doesn't launch Nginx remotely

I want to be able to start and stop an nginx server on an Ubuntu EC2 instance with Fabric. I have this two scripts in my fabfile.py: def start_nginx(): sudo('/etc/init.d/nginx start') #also ...
1
vote
5answers
1k views

apt-get does not remove initscript?

This day I tried to remove apache2. It's bundled with Ubuntu Lucid, which I don't need. I used apt-get remove apache2 to remove it. But somehow, the initscript was still there, in "/etc/init.d/". I ...
9
votes
2answers
21k views

Run nginx as a non-root user

I followed this process to installing nginx on my Ubuntu 10.04 Lucid Server http://library.linode.com/web-servers/nginx/installation/ubuntu-10.04-lucid I got lost after the point of creating an init ...
1
vote
1answer
307 views

chkconfig $svc reset does not take effect if executed by higher pri init.d service at boot?

On a centos 6 derivative (Amazon Linux), I have an init.d script ecrinit that is meant to enable/disable some services at system startup (based on contents of a properties file on disk): if [[ ...
3
votes
1answer
834 views

Have FishEye+Crucible start at boot on Ubuntu

I asked this question at Atlassian but figured serverfault might be more appropriate as it's more of a sysadmin question than an Atlassian question: I have been attempting to follow this guide to ...
0
votes
1answer
960 views

Can I use Upstart to start a script which requires the user's X session?

I wrote a script which greps through the output of synclient to determine whether a laptop's touchpad has miraculously turned itself off (Ubuntu seems to /love/ doing this recently) and, if so, turns ...
3
votes
3answers
2k views

memcached not restarting properly start-stop-daemon: warning: failed to kill 8175: No such process

im having some really weird and annoying issue with memcached. im running ubuntu server 10.04lts on a linode instance. i am using fabric with a django project and part of the fabric script allows the ...
0
votes
1answer
334 views

MySQL init.d script with different configuration file

I have two instances of mysql running on a server. I need two different init.d scripts. The two instances have different configuration files /etc/my.cnf and /etc/my-slave.cnf. I copied the ...
2
votes
1answer
1k views

Ubuntu Upstart job - “stop” is not recognized command

I need some help with this; endless upon endless scripts look exactly the same -- yet I can't seem to stop the job associated with an upstart script. I'm using any of the newest Ubuntu Elestic AMIs ...
1
vote
1answer
293 views

Nginx daemon doesn't want to stop on Ubuntu

I've got an Ubuntu 11.04 i386 server with Nginx 1.0.11. I'm also using this init.d script - the only one I've found. The server starts up well, but each time I'm trying to stop or restart it, the ...
6
votes
4answers
856 views

postgresql on Ubuntu 10.4 doesn't start on boot

I'm trying to have postgresql 8.4 start on boot on Ubuntu server 10.04 (64bit). First, I tried putting: su -c 'pg_ctl start -D /home/postgres -l /home/postgres/serverlog' --preserve-environment ...
1
vote
3answers
1k views

Starting a daemon automatically from init.d

I installed vnstats to see bandwidth statistics, I copied an init.d file tempalte, I placed it in init.d directory, it works ok to access this file and do start/restart/status, but this file should ...
1
vote
4answers
279 views

some startup-scripts are ignored (on debian 6.0)

After updating some stuff on one of my debian-servers it ignores "some" of the scripts it should run at startup (from "init.d"). For example Postfix, Memcached or other daemons are startet, but ...
1
vote
4answers
229 views

Do service apache2 restart and /etc/init.d/apache2 restart do the same thing?

Do the two different syntaxes do the same thing? $ service apache2 restart $ /etc/init.d/apache2 restart
0
votes
1answer
352 views

Glassfish 3 Cluster and Local init scripts

I'm trying to set-up a Glassfish 3.1.1 Cluster for testing purposes. Currently, I've got 2 hosts with Glassfish 3.1.1 installed. I've set-up a DAS domain on host1, and followed this guide to create ...
1
vote
1answer
485 views

init.d script worked OK on Ubuntu 10.10 but not on 11.10 despite LBS header correction

On Ubuntu 11.10, if I run /usr/bin/cserver -c /etc/cserver.conf & it'll work fine. But if I run service cserver start or /etc/init.d/cserver start as I did on 10.10, it won't. It just says ...
11
votes
3answers
15k views

How to find error messages from Linux init.d/rc.d scripts?

In Linux, I've written some scripts to be executed during boot and played around with the various ways of installing them. For larger scripts I'll put in /etc/init.d and link the appropriate ...
1
vote
2answers
71 views

Nginx update rewrites my own starting scripts in /etc/init.d/nginx. Is there a way to avoid this?

I have nginx plus fast cgi. I wroted starting script that starts nginx with fast cgi. But after nginx update system rewrites this script to the default starting only nginx. Is there any way to avoid ...
0
votes
1answer
808 views

Upstart output pre-start script content

Based on the content of the Ubuntu init.d script to control nginx instances, found at : http://wiki.nginx.org/Nginx-init-ubuntu I'm trying to update Upstart version, found at: ...