The init.d directory contains a number of start/stop scripts for various services on a Linux system.
Questions tagged [init.d]
352 questions
10
votes
1 answer
Supervisor doesn't start on startup on Ubuntu 16.04
I installed Supervisor on Ubuntu 16.04 with the command:
sudo apt-get install supervisor
Supervisor 3.2.0-2 successfully installed and works if I run it with the command:
sudo service supervisor start
But after reboot it doesn't start…

Dmitry
- 898
- 10
- 16
10
votes
3 answers
Add additional parameters to Spring Boot app
I am wondering if it's possible to add spring's additional parameters such as -Dspring.profiles.active=prod to spring boot app in case of running it as a service.
I checked the script that was generated automatically by…

nKognito
- 6,297
- 17
- 77
- 138
10
votes
5 answers
Mongo mongod init.d script not working on CentOS
I am trying to figure out why the provided init.d script is not working on CentOS. I tried starting it manually:
/etc/init.d/mongod start
But I get the following error:
Starting mongod: /usr/bin/dirname: extra operand `2>&1.pid'
Try…

lostintranslation
- 23,756
- 50
- 159
- 262
10
votes
2 answers
Special considerations for using Python in init.d script?
Are there any special considerations for using Python in an 'init.d' script being run through init? (i.e. booting Ubuntu)
From what I understand through googling/testing on Ubuntu, the environment variables provided to an 'init.d' script are scarce…

jldupont
- 93,734
- 56
- 203
- 318
9
votes
1 answer
Add nginx as a ubuntu service stop and reload doesn't work
My nginx was compile from the source, only give the flag that --conf-path=/etc/nginx/nginx.conf
Everything works and I was trying to use this service init.d script to make nginx as a system service,
Here's the script that I made only 2 minor…

mko
- 21,334
- 49
- 130
- 191
7
votes
3 answers
very strange behaviour with ruby, openssl, unicorn, systemd (Gcloud)
We started seeing some strange errors in our logs that normally appear when ruby isn't compiled properly with OpenSSL. But it's inconcistent...
We're getting errors like:
RuntimeError: Unsupported digest algorithm (SHA256). (also with other…

gingerlime
- 5,206
- 4
- 37
- 66
7
votes
1 answer
Difference between /etc/init.d and /sbin/service
What's the difference between starting daemons (tomcat for example) with /etc/init.d and /sbin/service? Is there a benefit to using one or the other?
Running CentOS release 5.8 (Final)

ObiWanShanobi
- 442
- 1
- 5
- 10
7
votes
2 answers
update-rc.d and init.d dependencies
So I'm trying to write some init.d scripts satisfying LSB so they run appropriately at startup and shutdown. Unfortunately, I'm having issues with LSB/update-rc.d to satisfy dependencies.
# Required-Start: $network $local_fs hadoop-namenode…

ohshazbot
- 894
- 3
- 8
- 16
7
votes
5 answers
Run Qt application on startup as Linux daemon
I've developed a Qt application which contains a TCP server and such. I'm now trying to make Ubuntu packages and let the application automatically start on startup.
The application needs to be running even if nobody is logged in, which means a…

dutchmega
- 1,384
- 2
- 12
- 16
6
votes
2 answers
What should the chkconfig line in a RHEL init.d script be set to for a process controller like supervisord?
I'm trying to write a init.d script for the first time to start a supervisord process. Supervisor is a process controller/manager like runit, upstart, or systemd. I would like it to start automatically if the system reboots, so that it can start my…

Matthew Moisen
- 16,701
- 27
- 128
- 231
6
votes
2 answers
Shell script ending with a line containing only a colon?
I'm studying System V init scripts found in /etc/init.d/ in current Debian 7.4.0 wheezy release(But its also present in other, previous, releases). Almost all of them (from existing services) found in that folder end with, basically an empty line…

Ivan Kovacevic
- 1,322
- 12
- 30
6
votes
2 answers
Start java process at boot and auto-restart on death
I have two requirements for my Java app. If it dies, restart it. If the server reboots, restart it - simple enough. Using the answer here I have a script that will restart when the java application dies.
#!/bin/bash
until java -Xms256m -Xmx768m…

GregB
- 63
- 1
- 1
- 6
6
votes
2 answers
How to detect when networking initialized in /etc/init.d script?
I have an /etc/init.d/ script that starts on boot and requires networking to be in place. I have the rc start set to 99, so it's the last thing that loads, but the networking doesn't load immediately and I'm currently having to rely on a 30 second…

BayssMekanique
- 894
- 1
- 14
- 27
6
votes
1 answer
Restart Node.js App with init.d
I'd like to have an init.d daemon restart my node.js app if it crashes. This script starts/stops my node app. I've had no luck getting it to restart the app if it crashes.
I'm running under CentOS. What am I missing?
#!/bin/sh
.…

Sparky1
- 3,335
- 6
- 26
- 29
5
votes
6 answers
How do I manage a Python based daemon on Linux?
I have a working Python based program that I want to run as a daemon. Currently I'm doing it in a very hackish manner of starting it in with screen-d -m name session and killing it with pkill -9 -f name.
Eventually I'm doing to have to move this to…

BCS
- 75,627
- 68
- 187
- 294