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
1answer
326 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 [[ ...
5
votes
1answer
973 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
1k 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
3k 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
377 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
2k 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
338 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
1k 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
309 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
232 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
380 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
549 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 ...
13
votes
3answers
23k 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
73 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
981 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: ...
1
vote
2answers
1k 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
2k 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
682 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
148 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 ...
2
votes
2answers
2k 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
1k 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
144 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 ...
8
votes
2answers
13k 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
443 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
318 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
170 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
292 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 ...
4
votes
2answers
2k 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 ...
0
votes
2answers
894 views

Commands /etc/init/boot.local get started before some environment variables get initialized

I have OpenSuse 11.4. I start some on-boot scripts inside /etc/init/boot.local. Where could I move those scripts so that they would be started after all (most) environment variables got initialized? ...
8
votes
5answers
10k views

How can I automatically restart a process after it terminates?

I've got a golang program that I want to restart after it terminates on a Debian Squeeze box. The thing is serving HTTP behind an Apache 2 mod_proxy setup. I don't expect the process to fail, but ...
1
vote
1answer
153 views

Considerations for building SysV or Upstart compatible Bash scripts

I've just knocked out a quick script for keeping a slave web server in sync with a master using rsync. (https://github.com/simonjgreen/liveFolderSync/blob/master/liveFolderSync.sh) I'd like to make ...
2
votes
1answer
968 views

mongoDB - Linux Service Startup/Shutdown is Failing (possible unclean shutdown)

Linux administration isn't my thing so I'm a bit over my head here. System information: /proc/version -> Linux version 2.6.18-028stab091.2 /etc/debian_version -> 5.0.8 Whenever the server is ...
1
vote
2answers
171 views

init.d service died

Adapting some code from a linux forum, I've added a service script to /etc/init.d on my ubuntu natty server to start/stop/restart node.js It literally was working the first day I made it, but then ...
1
vote
2answers
1k views

Ubuntu Server 10.04 autossh script in etc/init.d

I currently have a script in /etc/init.d which calls autossh with port forward to set up reverse ssh on the server. The command is preceded by 'sleep 20' to try to ensure the command is called after ...
1
vote
2answers
1k views

On RHEL 5.6 I have an init.d script which is stuck in an infinite loop. How to boot without loading it?

I made a bone-headed mistake in one of my init.d scripts which gets stuck in an infinite loop during the boot process and blocks the completion. I therefore can not get to a shell and fix it. How ...
2
votes
2answers
2k views

Ubuntu/Linux: how are startup parameters typically defined for startup scripts (sysvinit)?

I'm curious as to what's the standard method of telling a startup script to execute with certain parameters. For instance with MySQL, there's my.cnf, and from what I can tell, the startup parameters ...
2
votes
2answers
807 views

Proper Bash Daemon Script Creation

On Ubuntu, I copied /etc/init.d/skeleton as a new file and made it "all" executable (just like the others in that directory). In it, I made a "foo" that was just another Bash script in /usr/sbin, but ...
2
votes
2answers
4k views

/etc/rc.local not being run on Ubuntu Desktop Install

I have been trying to get sphinx to run at boot, so I added some lines to /etc/rc.local but nothing happens when I start up. If i run it manually it works however. /etc/init.d/rc.local start works ...
0
votes
1answer
733 views

init.d scripts not executed upon startup

I have a strange problem on an OpenSuSE11.1 box. Only very few of the init.d scripts for runlevel 3 and 5 are executed, eg. syslog and network. Despite the fact all links in the rcS.d folders are ...
3
votes
3answers
1k views

init.d script not starting on startup

I have what I consider to be a pretty simple script that I want to run on startup, however I'm pretty new to init.d scripts, and maybe there is a better way to do this in general. Basically I want my ...
2
votes
2answers
5k views

RH/CentOS service & chkconfig equivalents in Ubuntu/Debian

In RedHat/CentOS distros, you start and stop services with /sbin/service: /sbin/service httpd reload You set whether they should run on startup with /sbin/chkconfig: /sbin/chkconfig --levels 2345 ...
1
vote
1answer
468 views

Question regarding Linux LSB init script directives

I'm making some init scripts to start some system services that require other services to have started in order to start successfully. For instance, one service requires that xenstored be running ...
1
vote
2answers
2k views

Is LSB's init script function “start_daemon” really used for real daemons or should I stick to start-stop-daemon?

In the context of init scripts, according to the LSB specification, "Each conforming init script shall execute the commands in the file /lib/lsb/init-function", which then defines a couple of ...
4
votes
1answer
9k views

How to automatically start mysql after server restart (CentOS + other distros)?

How would I configure my CentOS Linux server to automatically start mysql when the server is started following a shutdown? I'm aware of the init.d path... /etc/rc.d/init.d ...and I can see mysqld ...
6
votes
1answer
6k views

Launching a PHP daemon from an LSB init script w/ start-stop-daemon

I'm writing an lsb init script (admittedly something I've never done from scratch) that launches a php script that daemonizes itself. The php script starts off like so: #!/usr/bin/env php <?php ...
1
vote
1answer
229 views

What's wrong in this “test -f” bash script that prevents dkimproxy from starting?

I was trying to configure dkimproxy on my server, after having used dkfilter for long time with success. The reason why I chose to "upgrade" is that DKIM protocol seems to be better supported than ...
0
votes
1answer
124 views

Bind will not run at start up

I have the named script in init.d and a symbolic link in all of the rc#.d directories. I can manually run the script and the symbolic links and named will start just fine. I added "touch ...
1
vote
1answer
906 views

How to unmount LVM automatically at shutdown (Debian/Ubuntu)?

I've created an LVM2 script in /etc/init.d/lvm2 and registered it with update-rc for startup, now the manuals I am reading states "immediately after all filesystems were unmounted:" that this should ...
1
vote
2answers
2k views

What is the proper setup for “anacron”? (Ubuntu 9.10, 10.04)

I am running Ubuntu 9.10 and 10.04 on MediaTemple (ve) servers. On both of them, the anacron setup is broken, ... and they have been broken since I first installed Ubuntu. It has only come to my ...