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

learn more… | top users | synonyms

0
votes
2answers
672 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? ...
7
votes
5answers
5k 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
137 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
617 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
159 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
719 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
1k 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
601 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
3k 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
458 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
737 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
3k 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
438 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
1k 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 ...
1
vote
1answer
3k 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 ...
5
votes
1answer
4k 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
209 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
120 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
853 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 ...
1
vote
1answer
373 views

Permission denied message when starting gfs2

Can anyone please explain why I get this permission denied error? I try starting the script and it fails with a permission denied message. So I create a copy of it and run that instead and that works. ...
1
vote
2answers
248 views

Run init.d script in the context of the current user session

I'd like to run a script in init.d (on Fedora) in the context of the user session I'm logging in as. I have a script called keyboard_deadkeys I wrote to set some deadkeys on my keyboard. The ...
2
votes
3answers
2k views

Comprehensive guide to init.d scripts?

I'm looking for good resources to learn more about how to write/debug/maintain init.d scripts on Ubuntu. Do you have any links or books to recommend ?
8
votes
4answers
1k views

init.d scripts written in Python

A question came up on SO asking about writing init.d scripts in Python. One comment indicated that these scripts should be programmed in shell not Python. Is writing init.d scripts in Python: Bad. ...
2
votes
1answer
3k views

insserv: There is a loop between service foo and bar if started… Breaks aptitude

Does anyone know how to resolve these init errors that happen from the Cyberpower powerpanel for linux package? Ref: http://www.cyberpowersystems.com/products/management-software/ppl.html - I tried ...
0
votes
1answer
944 views

Ubuntu 64bit Xen DomU Issues after upgrade from Karmic to Lucid

I was upgrading my servers today and it all went fine except the last machine which has the following issues: [Resolved using ...
3
votes
1answer
224 views

Problem with startup script

I am trying to get Chandler running on a debian box on startup under user 'chandler', and have tried the following script, locating it in init.d: #! /bin/sh # # /etc/init.d/chandler # RETVAL=$? ...
5
votes
4answers
1k views

No coredumps for daemons started at boot by init.d on Ubuntu

How can I get daemons started by init.d at boot to coredump on Ubuntu? This is what I have done so far... echo "ulimit -c unlimited" >> /etc/profile mkdir /corefiles/ chmod 777 /corefiles/ echo ...
0
votes
3answers
379 views

fedora 13 init.d script, can’t stop

I wrote init.d script that suppose to run java CLI proccess. The problem is that when i stop it, i get [failed] and the proccess is still running. thanks #!/usr/bin/env bash # # chkconfig: 345 ...
1
vote
2answers
1k views

Restart Apache and Kill All Sub Processes

I am trying to restart Apache on my server but it does not seem to kill all the processes that Apache is currently running. The command I am using is sudo /etc/init.d/apache2 restart Is there ...
2
votes
1answer
335 views

My init.d script is never called with the stop parameter?

I created a script called blueBoxT for starting and stopping Oracle and placed it in the /etc/init.d directory. #!/bin/bash echo "blueBoxT $1 - `date '+%Y%m%d%H%M'`" >> /root/blueBoxT.log case ...
1
vote
3answers
2k views

How to activate eth0 / eth1 earlier in ubuntu boot process

Let's see if I can explain this right: I have servers with two ethernet interfaces - one external and one internal facing. I have a DB (pg) on one server and accessible from other machines on the ...
13
votes
4answers
8k views

stop apache from asking for SSL password each restart [duplicate]

Using instructions from this site but varying them just a little i created a CA using -newca, i copied cacert.pem to my comp and imported as trusted issuer in IE. I then did -newreq and -sign (note: i ...
3
votes
1answer
513 views

Script in /etc/init.d won't run on startup (Ubuntu 8.10)

I'm on Ubuntu 8.10 The script runs when called from the command line with sudo /etc/init.d/xbindkeys start. Here's how it looks: #! /bin/sh ...
0
votes
2answers
481 views

Ubuntu SSLH Service Not Starting on Boot

I am trying to run SSH and HTTPS both on Port 443 on an Ubuntu server. I found SSLH which seems to do the trick. My only problem is getting it to start on system boot. Supposedly, it is already setup ...
2
votes
3answers
3k views

Unable to get Webmin or Vboxdrv to auto start on boot

Ever since installing Ubuntu 10.04 I've had issues getting things to auto-start. I have installed webmin and VirtualBox but every time I reboot I have to manually run: sudo /etc/init.d/webmin start ...
0
votes
1answer
4k views

How to properly create a startup script for tracd on Synology DS209+II?

I'm running tracd on a Synology DS209+II NAS. For that purpose, I have created a script in /opt/etc/init.d called S81trac: myserver> ls -l /opt/etc/init.d -rwxr-xr-x 1 root root ...
0
votes
1answer
365 views

Debian package with init.d without autostart

I'm trying to create a package which contains the init.d file, but doesn't try to start the daemon right after the installation. Currently, I'm using scripts created from the dh_make template. Right ...
2
votes
3answers
7k views

How can I adapt this debian init.d script to work with CentOS 5?

I'm trying to get an lsyncd daemon running. I installed the lsyncd RPM from epel, but it doesn't seem to come with an init.d script. In the lsyncd repository, there's this script that works with ...
0
votes
1answer
145 views

`# probe: true` in /etc/rc.d/init.d/* files on a RedHat system

Some files (e.g. nfs, nfslock, bind) in my /etc/rc.d/init.d/ directory have in their comment header a line such as: # probe: true I found that those particular scripts has the probe verb i.e.: ...
2
votes
3answers
6k views

Have a service start on startup with Ubuntu

I'm not clear on how to start a service when the server boots, I read on some of the other questions asked about adding the script to /etc/init.d, but It's just one line that I need to execute in the ...
3
votes
1answer
17k views

How to conform to update-rc.d with LSB standard?

This is a migrated question from stackoverflow, as I was told, this is the place for it to be. http://stackoverflow.com/questions/2263567/how-to-conform-to-update-rc-d-with-lsb-standard I have set ...
1
vote
3answers
5k views

Redhat init script best practice

I want to write an init service script which runs the program as a particular user (and not root). I will then chkconfig this script and install into my production run level. I could just put a su ...