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

learn more… | top users | synonyms

1
vote
2answers
116 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 ...
6
votes
2answers
3k 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
150 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
848 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 ...
0
votes
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
118 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
748 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
473 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
383 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
282 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 ...
2
votes
2answers
685 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
74 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
451 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 & ...
0
votes
0answers
225 views

init.d script runs correctly but process doesn't live when booted fully up

I have a problem with an init.d script #!/bin/bash ES_HOME="/var/es/current" PID=$(ps ax | grep elasticsearch | grep $ES_HOME | grep -v grep | awk '{print $1}') #echo $PID #exit 0 case "$1" in ...
2
votes
1answer
240 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 ...
8
votes
2answers
16k 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
287 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 [[ ...
2
votes
1answer
691 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
818 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 ...
2
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
0answers
973 views

lighttpd startup script says /etc/rc.status is missing

I am trying to install the lighttpd startup script. I followed these steps, but when I start it I get root@debian:~# /etc/init.d/lighttpd start .: 53: Can't open /etc/rc.status Seems rc.status does ...
0
votes
1answer
260 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
975 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
275 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
739 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
934 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
258 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
225 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
0answers
207 views

Memcached won't start as a service

I've installed memcached on my centos 5.2 box and it runs ok if I start it manually but I'm struggling to set it up as a service. After a long pause I just got this error: service memcached status ...
0
votes
1answer
312 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
425 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 ...
10
votes
3answers
10k 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
70 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
713 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: ...
0
votes
1answer
781 views

Run script before shutdown/restart

I'd like to run a PHP script when an instance is told to shutdown, but of course before it actually finishes shutting down. My particular script is just looking to push some log files from the local ...
6
votes
2answers
1k views

Call to daemon in a /etc/init.d script is blocking, not running in background

I have a Perl script that I want to daemonize. Basically this perl script will read a directory every 30 seconds, read the files that it finds and then process the data. To keep it simple here ...
4
votes
1answer
513 views

Disable colour output from /etc/init.d scripts?

On RedHat/CentOS systems, all of the service management scripts in /etc/init.d (and also run by the "service" command) produce color output. (i.e. the "[ OK ]" and "[FAILED]" strings.) How do I ...
3
votes
2answers
139 views

Is it possible to set an Upstart service to stop $LAST

I'm wanting the rsyslog service to run until the last moment to ensure we receive as much logging as possible on our central logging servers. On Ubuntu 11.04, rsyslog's stop line is set to "stop on ...
0
votes
0answers
347 views

Empty pid created by Redis 2.4 on Debian + dotdeb

I just upgraded our Redis from 2.2.2 to 2.4.1 (I use http://www.dotdeb.org/ for package management), and now, /etc/init.d/redis-server start creates /var/run/redis/redis-server.pid, but the content ...
1
vote
2answers
1k views

Reorder the way in which scripts are run at startup

I just moved to debian squeeze and need to change the startup sequence of some scripts. I used to do this with update-rc.d service defaulta xx xx but now with the LSB way of doing things the ...
0
votes
1answer
969 views

I can't get Postgres configured correctly

I have spent quite a bit of time wrestling with this postgresql update, but I just can't quite get it configured correctly. I recently upgraded from 9.0 to 9.1, and I can't get Postgres 9.1 configured ...
1
vote
2answers
131 views

Suppress startup status message in mongod

I'm setting up mongod to run in an /etc/init.d script. This may be a nitpick, but is there a way to avoid this? # service mongod start Starting mongod: forked process: 19820 all output going to ...
7
votes
2answers
7k views

Getting shell script to run as a daemon on CentOS?

EDIT: For some reason half of my post got truncated, not sure what happened. I will update soon and will post that it is updated here at the top. EDIT: I have updated the post again, sorry for the ...
4
votes
1answer
366 views

Managing services started on boot (rc0.d, rc1.d, etc)

What is the best way of managing which services start when? service --status-all lists all services, but does a poor job of the service status (most are "unknown") and does not provide any method of ...
2
votes
1answer
238 views

Chandler Start-Up Script /bin/bash vs /bin/sh

Have a Chandler install that worked fine for a number of months, but recently when I went to connect to the server, I noticed it wasn't running. SSHing in, confirmed it isn't running, so I go to ...
0
votes
1answer
140 views

/etc/init.d/functions weirdness

OS: fedora 15. seems something has gone awry inside my /etc/init.d/functions file. i can still stop/start/restart services and daemons using /etc/init.d/restart, but the output is no longer showing ...
1
vote
1answer
234 views

Does STDERR go to syslog in an LSB init script?

I am running a Debian system and have an init script in /etc/init.d/ that starts a daemon using start-stop-daemon: start-stop-daemon --start --quiet --pidfile /tmp/myproject.pid --exec ...
3
votes
2answers
1k views

Debian init script from scratch

I am trying to write an init script for the SCST iSCSI target software for Debian / Ubuntu. The current one in the download does not work and seems to be outfitted to work on SuSE and others. This ...