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

11
votes
1answer
4k 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 ...
-1
votes
0answers
27 views

Insert the environment path to script file to read [on hold]

I have a text file which has user input i.e LD_LIBRARY_PATH. I want to add the that library path environment text into the script file (/etc/init.d/scriptfilename). Will it be possible?
9
votes
7answers
30k 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 ...
0
votes
0answers
18 views

I'm able Start Service With init.d script, however doing service <service name> start does not work

I'm able to start a service with an init.d script, however doing service <service name> start does not work. For e.g. /etc/init.d/haskal start, the service is starting fine and service haskal ...
0
votes
1answer
2k views

Unable to start vsftpd service on CentOS 6.6

I have installed vsftpd ftp server on CentOS 6.6 with yum, But I can't start vsftpd service. When I run /etc/init.d/vsftpd start, I get Starting vsftpd for vsftpd: [FAILED] with no ...
1
vote
0answers
198 views

insserv: warning: script 'XXX.sh' missing LSB tags and overrides

What causes insserv: warning: script 'XXX.sh' missing LSB tags and overrides, and how is it prevented? pi@raspberrypi /etc/init.d $ sudo rm 5_* pi@raspberrypi /etc/init.d $ sudo vi ...
0
votes
2answers
21 views

Can't start remote WildFly with ssh

When executing remote script with SSH: ssh user@192.168.0.10 -t sudo /etc/init.d/wildfly start WildFly not started. If I run ssh user@192.168.0.10 -t /home/user/my.sh my.sh: !#/bin/bash sudo ...
1
vote
1answer
898 views

openfire chat server Deamon not getting start while server up every time

we using a Chat server, its installed with openfire, for local office use we installed it, every day morning while server getting ON openfire service is not getting started, I have added it in run ...
1
vote
0answers
21 views

When creating an init.d demon, what is the .service file?

I am trying to create a service that will eventually run at start, however I am getting stuck just trying to get the service to run using: sudo service fortech_bluetooth_server start Whenever I run ...
0
votes
1answer
912 views

RedHat init.d script will not start with service after stop

I have the service script below, which calls a shell script. We changed something in the script When I run the shell script directly, everything works fine. When I restart the servER, everything works ...
1
vote
1answer
61 views

Prevent shutdown using shell script run at shutdown

Background: I have a Python script that runs (infinitely) from startup in the background of a Ubuntu server. The process is ended by sending a SIGINT which is handled by the script which finishes all ...
11
votes
4answers
472 views

Is there a standard way to start and stop services on Linux?

Until recently there was a simple and effective way to start/stop/restart services: service nginx start|stop|restart This worked perfectly for so many years,... until some smart-pants decided to ...
1
vote
1answer
33 views

Why is a script in /etc/rc6.d not run on reboot?

I am trying to log shutdown/reboot on a Raspberry Pi. I am running latest Raspbian. This is my setup: cat /etc/init.d/log-shutdown.sh: #!/bin/sh ### BEGIN INIT INFO # Provides: ...
0
votes
1answer
140 views

dropbox process stops when I log out of ssh

I tried every solution from How to run Dropbox daemon in background? and nothing solves my problem: Basically, I already installed dropbox on my Ubuntu 12.04LTS headless server. I got init.d setup ...
6
votes
1answer
2k 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
1answer
5k views

How does killproc knows what PID to kill?

When I look at my /etc/rc.d/init.d/functions, I see the following under my killproc() function. if [ -n "${LSB:-}" -a -n "$killlevel" ]; then RC=7 # Program is not running ...
0
votes
1answer
15 views

linux + configure the checkconfig for new script in /etc/init.d

I want to add new script - doCopy under /etc/init.d /etc/init.d/copy how to add this script for chkconfig so if I will run: chkconfig --list | grep doCopy I will get: doCopy ...
2
votes
1answer
54 views

Why does postfix copy /etc/resolv.conf to its chroot too early, causing DNS failures?

Edit: For anyone else having this problem, this question was actually was very badly asked/understood and a better description of the problem (and the correct solution) can be found here. I'm trying ...
3
votes
2answers
98 views

(Raspian) DHCP startup race conditions - lots of service failures at startup (no DNS for ~5-10 seconds)

(Edit: This applies to much more than postfix; it's just where I noticed/debugged it) I've installed postfix, but when it starts up and creates its chroot, it gets an empty copy of /etc/resolv.conf ...
4
votes
1answer
69 views

Understanding the linux boot order in /etc/init.d

This question is about Debian, but I guess it's the same in many linux environments. The /etc/init.d directory defines the services that run at boot-time. As I see it, there are two mechanisms that ...
3
votes
2answers
43 views

Unblocking wifi using rfkill on startup

I'm using Debian wheezy on an embedded platform (iMX.6 on Solidrun Hummingboard), and I have rfkill blocking my WiFi. the command sudo rfkill unblock wifi works, so I've created a script called ...
0
votes
2answers
26 views

Best way to start multiple “screen” scripts after restart? (centos)

We are using centos. As soon as the server is restarted and the OS is fully loaded, we would like to have a certain user ("foo") start three or four scripts with screen. For example, screen -d -m -S ...
1
vote
0answers
34 views

Running Python application on boot through init.d script

I am trying to start an Python application on a Debian based OS that is running on a router. This application comes prebundled with site-packages and a python binary. Like a virtual environment. The ...
0
votes
2answers
145 views

NFS mount at boot with autofs on Raspbian Jessie

I'm trying to configure my RPi with Raspbian Jessie to use autofs to mount at boot a NFS share from my QNAP NAS. The manual mount with mount -v -t nfs server://share /mnt/share works and also the ...
0
votes
1answer
82 views

Create aMule daemon systemd .service file

I recently moved to Raspbian Jessie on my RPi and now I'd like to move all my services from init.d to systemd. aMule daemon it is now working with init.d but I want to move the script to a ...
2
votes
2answers
31 views

How to measure uptime between restarts

I want to track my time at the desk. As a first approximation, I guess tracking the time the computer is turned on, and then subtracting the relatively constant lunch break should do. How can I ...
0
votes
1answer
24 views

linux program not running at boot time

I have a few scripts: collection.sh start.sh script1.sh and script2.sh. I have these set up to run at boot time so that: collection.sh calls start.sh start.sh calls both script?.sh collection is ...
2
votes
1answer
856 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 ...
3
votes
2answers
5k views

Nginx init.d script

After a dist-upgrade on my debian machine yesterday I am having some problems with the nginx init script. Whenever I try to start nginx using the init script it comes up with a error message: # ...
0
votes
3answers
80 views

Startup script needs root permissions

I have a script that I need to run at startup. I have it in init.d. I need to execute one of the commands within the script with root permissions. How do I go about doing this? Edit 1: For ...
0
votes
0answers
37 views

How to enable kibana at startup

I just downloaded kibana-4.3 tar file , extract it and it works fine. But i want to enable the service at system startup and i got the error by using chkconfig command: service kibana does not ...
14
votes
2answers
14k views

How does systemd use /etc/init.d scripts?

I just switched to debian jessie, and most things run okay, including my graphical display manager wdm. The thing is, I just don't understand how this works. Obviously my /etc/init.d/wdm script is ...
1
vote
0answers
16 views

Log on standard output

I'm using Debian Jessie and I'm having big init.d script which starts or stops variety of daemons (more than 10), which list is taken from configuration file. Using systemctl restart parstart.service ...
0
votes
1answer
44 views

Execute a init script from C++ program

I have a script in my /etc/init.d/ which executes an application. I am able to start,stop and get status of the service from terminal. Now I would like to start the same service from my C++ program. ...
0
votes
0answers
13 views

inittab entries without runlevels

Refering to here 1 ap::sysinit:/sbin/autopush -f /etc/iu.ap 2 ap::sysinit:/sbin/soconfig -f /etc/sock2path 3 fs::sysinit:/sbin/rcS sysinit >/dev/msglog 2<>/dev/msglog </dev/console 4 ...
1
vote
0answers
32 views

What puts TCPMSS in iptables?

I used to have (well, I still sort of do) have a script that expects: -A FORWARD -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu to have been entered in to iptables ahead of my ...
0
votes
1answer
56 views

init.d script doesn't give standard output

I'm using Debian Jessie and when I'm trying to use some script from init.d (start, stop, restart). There are functions log_failure_msg log_daemon_msg log_end_msg which should give something on ...
0
votes
1answer
32 views

Two implementations of reboot?

Why do there seem to be two implementations of reboot on my linux system? # find . -name "reboot" ./etc/init.d/reboot ./sbin/reboot
0
votes
1answer
113 views

What stands for `xxx.d` in home directory? daemon? [duplicate]

Like emacs.d, some programs have name like xxx.d for init files. What does this d means? Is this abbreviation of something?
7
votes
3answers
15k views

Running a script during booting/startup; init.d vs cron @reboot

I am currently trying to understand the difference between init.d and cron @reboot for running a script at startup/booting of the system. The use of @reboot (this method was mentioned in this forum ...
2
votes
2answers
8k views

Run a GUI program at startup

I am using Ubuntu 14.04. I wrote a small script named trial. The contents of the script are as follows: #!/bin/sh SHELL=/bin/sh PATH=/bin:/sbin:/usr/bin:/usr/sbin sh -c firefox I copied the ...
0
votes
1answer
54 views

start-stop-daemon: option '--exec' requires an argument

I do not understand this error: start-stop-daemon: option --exec requires an argument I am very new to the init.d world and have only just got my script going using service calls, I just want to get ...
0
votes
0answers
23 views

Who does write apache2 PID on Debian 8

I am a bit lost: who is in-charge to write the apache2 PID in Debian GNU/Linux 8 (jessie)? I think /etc/init.d/apache2 invokes /usr/sbin/apache2ctl which in turn calls /usr/sbin/apache2. But in ...
1
vote
1answer
28 views

Does metainit have a directive to generate a log file?

Does metainit have a directive to generate a log file by redirecting process's standard output stream to it? The naive way of: Exec: /srv/wordy/wordy >/var/log/wordy.log does not seem to work ...
0
votes
1answer
90 views

Init script for a daemon to run screens on CentOS

I have a question concerning a init.d script. Currently I have a init script that launches a custom daemon as follows: sudo -u "$user" $cmd >> "$stdout_log" 2>> "$stderr_log" & ...
3
votes
1answer
5k views

systemd: default value for environment variable

I would like to migrate some OpenRC init script to systemd but I think that it is general problem of environment variables handling in systemd. Original OpenRC files There is a file e.g. ...
0
votes
1answer
58 views

Automatically start a script while booting on OpenSuse 11

I need the following sample script to run when OpenSuSe 11 is booting: #!/bin/sh i=0; while true; do "SOME COMMAND FOR SAVING i TO ANOTHER PLACE" &> /dev/null i=$((i+1)) sleep 1 ...
0
votes
0answers
138 views

How to make resolvconf / dnscrypt / unbound work together on systemd - and respect openVPN routes?

I'm finding it tremendously confusing to appropriately setup Unbound.service on systemd. Use Case I am trying to get my Debian Jessie laptop to use DNScrypt as default DNS and Unbound as the local ...
2
votes
1answer
59 views

Init scripts. Distinction of booting and starting activity

I have some script that runs and shuts down some service placed into /etc/init.d. It has symbolic link into /etc/rc5.d added with chkconfig for autolaunch on booting. Hence it starts on boot and can ...
2
votes
0answers
97 views

Unable to start ZNC as a service

Firstly, this is the exact same question as found here, but the given solutions did not work in my situation. Background I am running a CentOS 6 VPS and I want to run a ZNC bouncer on it. I ...