Questions tagged [sysvinit]

SysVinit is a set of programs and scripts that control the startup, running and shutdown of all other programs.

282 questions
174
votes
2 answers

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 called, because when I put an early exit in there,…
Martin Drautzburg
  • 2,498
  • 3
  • 16
  • 18
102
votes
5 answers

How to find out if a system uses SysV, Upstart or Systemd initsystem

Is there a simple way to find out which initsystem is being used e.g by a recent Debian wheezy or Fedora system? I'm aware that Fedora 21 uses systemd initsystem but that is because I read that and because all relevant scripts/symlinks are stored…
Valentin Bajrami
  • 9,244
  • 3
  • 25
  • 38
98
votes
2 answers

What does status "active (exited)" mean for a systemd service?

I'm working with a custom service which essentially runs a web server, called thisismywebserver. Currently it's not working (ie I get an "Unable to Connect" error trying to access a page). When I run this command service thisismywebserver status to…
Highly Irregular
  • 2,455
  • 6
  • 23
  • 24
86
votes
3 answers

How do services in Debian work, and how can I manage them?

In Windows I have the services manager, where I see all system services, that can be started through Windows itself, I set up the user it uses, the rights management is in there, and I can pass variables and some other information to the services, I…
Erdinc Ay
  • 1,000
  • 1
  • 7
  • 13
84
votes
4 answers

How to change systemd service timeout value?

In the company I am working now there is a legacy service and its init script is using old SysvInit, but is running over systemd (CentOS 7). Because there's a lot of computation, this service takes around 70 seconds to finish. I didn't configure…
Caesar Ralf
  • 1,063
  • 1
  • 8
  • 10
72
votes
4 answers

Keeping a process running after PuTTY or terminal has been closed

I'm running a Node.js server off of a Raspbian (Debian) machine, and I'd like to start and stop the server remotely. This for me means using PuTTY to access the shell, except when I close out of the PuTTY terminal or it times out, my server goes…
Spencer
  • 723
  • 1
  • 6
  • 4
62
votes
1 answer

Convenient way to check if system is using systemd or sysvinit in BASH?

I am defining common bash files which I want to use across different distributions. I need a way to check if system is using systemd or sysvinit (/etc/init.d/). I need this so I run appropriate command to start the service. What would be safe way to…
ek9
  • 2,875
  • 3
  • 18
  • 27
57
votes
3 answers

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 by hs.chandra) is some what simpler, by simply…
3kstc
  • 4,616
  • 15
  • 33
  • 49
51
votes
6 answers

How do I create a service for a shell script so I can start and stop it like a daemon?

I'm using CentOS 7 what my aim is to create a cron for every five seconds but as I researched we can use cron only for a minute so what I am doing now is I have created a shell file. hit.sh while sleep 5; do curl http://localhost/test.php; done but…
codegasmer
  • 623
  • 2
  • 9
  • 12
26
votes
4 answers

What's the connection between "/etc/init.d" and "/etc/rcX.d" directories in Linux?

I am learning command line from a book called "Linux Command Line and Shell Scripting Bible, Second Edition." The book states this: Some Linux implementations contain a table of processes to start automatically on bootup. On Linux systems, this…
its_me
  • 13,709
  • 23
  • 54
  • 52
22
votes
3 answers

Systemd and process spawning: child processes are killed when main process exits

Don't normally post here but I am ripping my hair out over this one. I have a Python script that forks when it launches, and is responsible for starting a bunch of other processes. This script used to be launched at startup via sysvinit, but…
Bottswana
  • 391
  • 1
  • 2
  • 9
20
votes
1 answer

Confused about /etc/init.d vs. /lib/systemd/system services

I am trying to run MongoDB on a Debian 8.5 machine. When I installed the package (pre-built from percona.com), I noticed the following files: /etc/init.d/mongod (1) /lib/systemd/system/mongod.service (2) I understand that /etc/init.d/mongod is…
natario
  • 303
  • 1
  • 2
  • 5
15
votes
2 answers

How to find out in which order /etc/init.d scripts are load on Debian?

I want to run one sysvinit script before another and figured out how to do that. To make sure, this actually happens in the the order I like, I would like to see a list, in which order that happens. I found sudo insserv --showall already, but can't…
adrelanos
  • 1,786
  • 7
  • 29
  • 56
14
votes
4 answers

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 the distribution switched to systemd and now I am facing with Debian/Ubuntu…
sorin
  • 1,219
  • 2
  • 14
  • 18
13
votes
1 answer

Minimal Linux with kernel and BusyBox: /etc/inittab is ignored, only /init is executed

I managed to create a small and fully functional live Linux CD which contains only kernel (compiled with default options) and BusyBox (compiled with default options + static, all applets present, including /sbin/init). I had no issues to create…
Ivan Davidov
  • 501
  • 2
  • 4
  • 13
1
2 3
18 19