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

4
votes
1answer
5k 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 /etc/...
0
votes
0answers
18 views

Install custom init.d service on debian7?

please help me. Stupid question, but I look at the syntax and do not really understand how to correct it. The point: do a service for python3 http server. The command must be executed so. cd /var/www/...
1
vote
1answer
27 views

How to setup a docker container to run on boot in CentOS 6.7

I have a CentOS 6.7 server and I would like to run the docker containers at boot time. The docker service already gets started at boot time. I would like to run this command on boot time: docker ...
1
vote
0answers
15 views

starting application in rc.d causes terminal to freeze

I have a application which uses stdin and stdout. I wish this application to start running as soon as possible after all the background daemons are running. I am using openwrt on an embedded system, ...
2
votes
1answer
26 views

Writing daemon, /etc/rc.d/init.d/functions hangs

I am writing my own service daemon for Fedora 23 and I stucked, when my script hangs while including source function library. #!/bin/sh # # service-live-text-relation <summary> # # chkconfig: ...
0
votes
1answer
977 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 ...
3
votes
1answer
44 views

Executing multiple commands in init.d script

I have the following init.d script: #! /bin/sh ### BEGIN INIT INFO ...
5
votes
2answers
62 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
1answer
21 views

SLES12SP1: How to add memcached to the new Services Manager

I installed a new SLES 12 SP1 VM from the scratch with memcached from https://memcached.org/. My question: On SLES 12 the /etc/init.d/<service> notation has gone. It is now provided by the ...
1
vote
1answer
1k 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 ...
0
votes
0answers
20 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
45 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
55 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
37 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
184 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
39 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
774 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
17 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 # ...
1
vote
2answers
148 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
139 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
25k 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
31 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
13 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 ...
12
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
34k 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
29 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
234 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
39 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
32 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
137 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
674 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
84 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
179 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
121 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
156 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
105 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
66 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
32 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
63 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
258 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
146 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
37 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
946 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
6k 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: # ...