init.d (usually /etc/init.d) is a directory holding configurations regarding programs to be started at boot time by the `init` process. For questions regarding the `init` process itself, use [init].

learn more… | top users | synonyms

13
votes
2answers
1k views

How secure is keeping non-root owned scripts in /etc/init.d?

I have an application which runs as a daemon and is controlled by a script in /etc/init.d Sometimes we need to change some parameters of startup/control of these scripts and then restart the daemon. ...
7
votes
1answer
2k views

What is the difference between start-stop-daemon and running with &?

I am setting up a service in /etc/init.d. I am looking at various scripts in there, some are implemented with start-stop-daemon ... and some with /path/to/script &. All of them save the pid in a ...
6
votes
2answers
1k views

How to regenerate /etc/init.d/.depend.(boot|start|stop) on Debian?

Suppose one deleted the following files. /etc/init.d/.depend.boot /etc/init.d/.depend.start /etc/init.d/.depend.stop How to regenerate them?
6
votes
1answer
351 views

Is it possible to write portable service scripts to control a daemon?

I (or one of my colleagues) need to write one or more shell scripts to control the execution of a daemon. We need to be able to start the daemon, tell it to gracefully shut down, and force a shutdown. ...
5
votes
2answers
682 views

What's the difference between /etc/rc.d/rc*.d and /etc/rc*.d

I know that rc*.d directories are used at startup, or reboot, or so on time, for starting or stopping programs. Can anybody explain me what's the difference between the rc*.d folders placed under the ...
5
votes
2answers
2k views

Is it possible to execute a script as first at shutdown/reboot on Debian?

I am currently trying to register a script (located in the /etc/init.d) in a way that makes this script being executed as the first script/programm at shutdown/reboot (change to running level 0 or 6). ...
4
votes
2answers
504 views

When running to a run level does it execute previous run levels?

If I tell my system to go to run level 3 does that mean that it first runs through run level 0, 1, 2, and then finally runs through run level 3? I thought the answer to this question was yes. But ...
4
votes
1answer
9k views

How do I set the user of php-fpm to be php-user instead of www-data?

I am using php-fpm on debian with nginx for php5 support. I would like to have php-fpm to be under the user&group php-user instead of www-data. I thought the init.d script would have the user ...
4
votes
2answers
88 views

Trigger an init script when a specific device is up and a kernel module has been loaded

On my ubuntu 12.04 servers, I need to write an init.d script that waits until the infiniband interface (device: mlx4_0, interface: ib0) is completely up, and until the knem kernel module is loaded. ...
4
votes
1answer
465 views

How does init determine which devices to modprobe?

I'm building a totally custom initramfs for a netbooting project and in the process learning a lot about it, but I'm a little puzzled by the loading of modules. I know modprobe can be used to load ...
4
votes
1answer
2k views

Where is my /etc/init.d/skeleton on OpenSuse 12.3?

On a fresh install of OpenSuse 12.3, I want to "daemonize" a program. And, on all examples found on Internet, I see I have to create first a /etc/init.d/myscript based on the /etc/init.d/skeleton... ...
4
votes
2answers
5k views

Run script on start up after everything else

OK, so there's a service (nagios) running on a Debian box that runs just fine, except for one very specific issue that only occurs after the box has been re-started. The issue is easily fixed by ...
4
votes
3answers
2k views

Use start-stop-daemon for a PHP server

I'm working on a socket server written in PHP. This part of the work is done but now I need to run it as a daemon. For this I've tried to use start-stop-daemon but it doesn't work. My server is ...
3
votes
4answers
21k views

How to run my script after SuSE finished booting up?

I want my server to notify me (via growl) that the (re)booting finished. I have the php file that sends out the growl ready but I do not know what file I should add the line in. What file I need to ...
3
votes
2answers
204 views

How to make /etc/init.d script act like it's launched under X?

I'm trying to track down some quirkiness with a Java application that misbehaves when launched via a startup script in /etc/init.d , but runs fine when you open a GUI terminal window and run it ...
3
votes
1answer
78 views

What does the hyphen mean in chkconfig run level in an /etc/init.d script?

I just have a simple question but scouring the search engines I have not found any explanation of what the - (hyphen) in the chkconfig run level actually stands for within the init script file. For ...
3
votes
1answer
821 views

PID file not accessible after update of nginx

After I removed the version 0.7.x which was delivered by the Debian standard packages, I installed the version 1.4.1 of nginx by source. It is possible to start nginx with service nginx start and I ...
3
votes
2answers
472 views

How to update an init script

What is the proper way to update an init script an ubuntu system? I am trying to upgrade my version of gitlab from 6-0 to 6-1, part of the upgrade consists of replacing the init script. Upgrade ...
3
votes
1answer
6k views

Create and control start up scripts in BusyBox

I have compiled a custom linux kernel in BusyBox. BusyBox init does not support runlevels. When the kernel boots up in BusyBox, it first executes init which looks for the specified runlevel in ...
3
votes
1answer
262 views

how to specify daemon dependency upon another daemon

in /etc/init.d/ first daemon # Provides: first # Required-Start: $remote_fs $syslog second daemon # Provides: second # Required-Start: $remote_fs $syslog first Is this ...
2
votes
3answers
1k views

disable init.d script in systemd

I changed the init system from sysvinit to systemd on a raspbian installation. The install boots fine, but now starts lightdm on boot. I don't want it to do that. I noticed lightdm.service is started ...
2
votes
2answers
2k views

How do I force booting in text mode?

Newer Linux distributions have the idea to boot into graphics modes. The grub menu does this. The init.d system does this. X does this. I can justify X. But both grub and init.d have only caused ...
2
votes
2answers
115 views

Postponing ntpd

I am currently trying to cut boot time for an embedded Linux system. One way we figured we could do that is by postponing the ntp init.d script. The daemon tried to synchronize with the server via ...
2
votes
2answers
3k views

How to debug init.d script that isn't being run

I am trying to get god to start during boot on Debian. I added a script to the /etc/init.d/ directory which looks like this. #!/usr/bin/sh ### BEGIN INIT INFO # Provides: god # ...
2
votes
1answer
2k views

Can I safely disable abrtd on CentOS 6?

There is this nice new daemon called abrtd running on CentOS6. This was inherited from upstream RHEL6. There this can be used (for instance) to automatically generate service-requests. In an ...
2
votes
2answers
1k views

Why is rcS required after file system is mounted by the kernel?

I am a beginner in embedded Linux, I have compiled the kernel without initramfs and kernel is booting fine. But It shows me rcS file is not found I have put it in /etc/init.d/rcS and my rcS file look ...
2
votes
2answers
444 views

start-stop-daemon won't start my Python script as service

I am trying to run Google AppEngine on my Debian machine, I created a file init.d/gae: . /lib/lsb/init-functions # # Initialize variables # name=gae user=$name pid=/var/run/$name.pid prog="python ...
2
votes
1answer
373 views

How to respawn vpnc when it stops?

As root, I've setup a crontab rule that launches vpnc everyday early in the morning (before I arrive at my workplace). But it often occurs that the vpn stopped mid day. As a result, I have to sudo ...
2
votes
2answers
1k views

editing /etc/init.d/rc.local to run after login tty processes

doing a ps-e, I see the following on startup: PID TTY CMD ... 1880 ? my_auto_script 1881 tty1 login 1882 tty2 getty ... my_auto_script is called from /etc/rc.local. I have /etc/init.d/rc.local ...
2
votes
2answers
1k views

init.d script causes boot hang

I successfully installed a script to automatically launch in /etc/init.d on my new Raspberry Pi. Unfortunately, it is a node.js app that never returns, and therefore hangs the device during boot ...
2
votes
1answer
29 views

Is there an init.d start log?

I am experiencing a problem with an init.d script (the service won't start), so I'm wondering if a log is available so I can fix the problem.
2
votes
1answer
32 views

Late running of scripts during bootup, ending with a reboot without the login prompt

I'm making a special "installer" for an embedded system where I'd like the kernel to boot up, execute a set of things very late in the process where the peripherals have been set up and then reboot ...
2
votes
2answers
170 views

How can I make this System V init script start at boot?

I've installed udisks-glue on my Raspbian Raspberry Pi, along with a System V init script at /etc/init.d/udisks-glue (as per instructions here). I make it executable and run the following, which ...
2
votes
3answers
1k views

Cannot add script to init.d

I have installed gerrit on a remote ubuntu server. Now I would like it to automatically start when the server reboots. I am trying to follow this: ...
2
votes
1answer
947 views

VMWare daemon doesn't startup when system starts

I have installed VMware Player on my Debian squueze, but after the reboot the vmware daemon(/etc/init.d/vmware) does not start up automatically, i have tried without any success to set the daemon ...
2
votes
4answers
5k views

hostapd will not start via “service” — but will start directly

I am having trouble getting hostapd to start as a service. It fails when I try to start it: $ sudo service hostapd start [FAIL] Starting advanced IEEE 802.11 management: hostapd failed! From what ...
1
vote
2answers
158 views

How does the script /etc/init.d/sudo work?

I was reading the script /etc/init.d/sudo. It has been written as a comment in the script that it provides limited super user privileges to specific users. Though, I could not understand the script ...
1
vote
4answers
94 views

How to have service that makes sure program keeps running?

I made a service called thin_keep_alive_service in /etc/init.d. I gave it chmod +x rights. The script looks as follows: #!/bin/bash ### BEGIN INIT INFO # Provides: thin_keep_alive_service # ...
1
vote
1answer
5k views

How to start teamspeak 3 on boot, ubuntu server 12.04

So I'm quite new to linux but I'm starting to understand it. I have a Ubuntu Server 12.04 system, fresh install, and I installed a teamspeak 3 server on it: $ sudo useradd teamspeak (provided user ...
1
vote
3answers
4k views

Difference between /etc/init.d/networking restart and invoke-rc.d networking restart

Is there any real difference between /etc/init.d/networking restart and invoke-rc.d networking restart (Debian)?
1
vote
4answers
3k views

When to mount /tmp (and other temporary directories)

When is the right time to mount /tmp (on Debian)? For /home I would not feel bad just to echo "/dev/foo /home type defaults 0 0" >>/etc/fstab - but can I be sure that /tmp is not used by any ...
1
vote
1answer
209 views

What is the difference between rc, rc.local and rc.sysinit?

I tried to display the list of startup scripts for the current runlevel at bootup. I wrote the following code. rl=`runlevel | cut -d " " -f2` ls /etc/rc.d/rc$rl.d/S* | cut -d "/" -f5 sleep 10 It's ...
1
vote
1answer
320 views

Use /etc/init.d/fetchmail with the personnal ~/.fetchmailrc

Now, I have two users in my system using fetchmail with a personal ~/.fetchmailrc and syncing there mails with the command fetchmail -kv --uidl -m '\''/usr/bin/procmail -d %T'\ (In a cron but this ...
1
vote
1answer
691 views

Daemons not starting during the boot on PUIAS (RedHat) 6.4

I am total Linux n00b entrusted with bunch of PUIAS (RedHat) 6.4 servers and desktops. I noticed after rebooting my computing nodes (done just for testing purposes) that many of the daemons which are ...
1
vote
1answer
343 views

Which parameters were used by apt-get to install init scripts for a package?

After removing the init script for hdparm with # update-rc.d hdparm remove, the wish is to re-install/fix/repair the hdparm init script. In other words to undo the update-rc.d removal. Calling # ...
1
vote
1answer
1k views

How to correctly remove mountnfs from /etc/init.d/

Cleaning up the boot process of a Debian squeeze installation running on kernel 3.2.0-0.bpo.3-amd64, I spotted several mountnfs scripts in /etc/init.d/: # ls /etc/init.d/ | grep mountnfs ...
1
vote
1answer
18 views

What starts syslog and logrotate?

I was looking under /etc/rc?.d and I didn't see many scripts compared to the number of scripts in /etc/init.d. I see syslog running on my machine but who started it ? No script in /etc/rc?.d point to ...
1
vote
1answer
440 views

Create service from command [closed]

I have following command which I try to setup to run on startup: su -l hive -c "nohup hive --service metastore > /var/log/hive/hive.out 2> /var/log/hive/hive.log &" I was thinking about ...
1
vote
1answer
2k views

Make screen start as Daemon for a Minecraft server

I made a script that runs fine manually, but can't get it to run with the description in How to start a script file on boot?. I have run update-rc.d -f minecraft.start defaults This is what my ...
1
vote
2answers
568 views

PHP exec expect script with SCP then SSH

I have a PHP page which runs the following expect script to upload a file to another server on my network: #!/usr/bin/expect -f set password [lindex $argv 0] spawn /usr/bin/scp /home/Dave/bin/test ...