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

1
vote
1answer
977 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 ...
5
votes
1answer
43 views

Making environment variables available for downstream processes started within an init.d script

This questions stems from @FrustratedWithFormsDesigner comment. How do I make export environment variables set within an init.d script available to downstream processes started within that same init....
0
votes
0answers
14 views

hadoop as init.d Process - status_of_proc return process not found

I was trying to use the init.d script to control hadoop service. The start and stop commands work without any issue. However status_of_proc does not find the process and its returning service is not ...
0
votes
0answers
40 views

Linux + how to shutdown application properly with reboot or init 0 + init.d scripts

I have Linux Redhat (version 6.5) machine that manages some application before each reboot or init 0 I shutdown the application as the follows: /etc/app-LM.bash /etc/app-UPP.pl /bin/DT-apl.c ...
1
vote
0answers
34 views

Runlevels behaviour when kill script has failed

When I execute sudo init 3, the system executes the kill scripts in /etc/rc.3/ One of those scripts returns a failure (this is expected because the thing it's trying to do won't work). When I then do ...
2
votes
1answer
22 views

What are the variables $remote_fs and $syslog on SysVinit LSB header?

From: https://wiki.debian.org/LSBInitScripts Add a block like this in the init.d script: ### BEGIN INIT INFO # Provides: scriptname # Required-Start: $remote_fs $syslog ...
5
votes
1answer
164 views

“service {FOO} start” vs. “/etc/init.d/{FOO} start”? [closed]

I use CrashPlan on my Debian 8 desktop. I have a script where I must stop the CrashPlan service at the beginning and then start it before exiting. I was using /etc/init.d/crashplan start for the ...
0
votes
0answers
28 views

linux + start script under /etc/init.d dependencies with other services

from some reason the script UPMnT.sh not start at boot I cheeked everything: chkconfig is ok links are ok but I worry about maybe there are dependencies between other script to this script can ...
4
votes
2answers
771 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 ...
2
votes
1answer
16 views

Update on reboot with init.d

I created a script to add a bunch of packages and update the system on a fresh install. Here's the relevant part of my init.d script that is giving me trouble: #!/bin/sh ### BEGIN INIT INFO # ...
0
votes
1answer
952 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
2answers
143 views

Running SQL call as root user in init.d script?

I have an SQL query that must be run on every startup after a software update (updates come with new installations of mysql and thus change the debian-sys-maint user's password, which my script ...
2
votes
1answer
122 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 ...
11
votes
3answers
24k views

The rc0.d,rc1.d,… directories in /etc

I'm running Ubuntu where I have the directories /etc/rc0.d, /etc/rc1.d, /etc/rc2.d, ..., /etc/rc6.d. Example files from my machine: directory example symlinks in the dir ------------------------...
2
votes
1answer
30 views

pdflatex/lualatex called from shutdown script can not find installed packages

At work I have set up a little backup script on my Ubuntu 14.04.1 machine. The script backs up my machine to an external hard drive. After this is done it copies a LaTeX project to my Dropbox and ...
2
votes
0answers
10 views

Linux startup script dependency issue

I have a startup script in init.d that starts some process that depends on Redis server running. When init script executes on boot my process fails due to connection failure to Redis server. I have ...
1
vote
0answers
2k views

Bittorrent Sync Autostart as a Service

I'm running a raspberry pi with the latest raspbian (debian) on it. I've installed btsync. Now I want to run Bittorrent Sync, when the system boots, not only when somebody logs in. Do I have to run ...
11
votes
1answer
5k 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 ...
10
votes
7answers
33k 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
23 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
3k 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
224 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 /etc/init.d/...
0
votes
2answers
32 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
0answers
29 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 ...
1
vote
1answer
116 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
606 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
56 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: log-...
0
votes
1answer
167 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
3k 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 ...
3
votes
1answer
6k 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
16 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 0:...
2
votes
1answer
101 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
139 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
85 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
54 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
29 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
52 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
210 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
125 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 amule-...
2
votes
2answers
34 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
916 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
144 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 reference,...
0
votes
0answers
52 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 ...
18
votes
2answers
20k 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
57 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
15 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 is:...
1
vote
0answers
39 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 ...