Questions tagged [init.d]

The init.d directory contains a number of start/stop scripts for various services on your system.

Everything from acpid to x11-common is controlled from this directory.

253 questions
257
votes
4 answers

How do I stop Apache2 from automatically starting on boot?

How do I stop Apache2 from automatically starting on boot? I can't seem to find an option that disables the automatic start-up when I turn on the machine.
chip
  • 2,831
  • 4
  • 16
  • 13
253
votes
3 answers

What is the difference between /etc/init/ and /etc/init.d/?

What is the difference between /etc/init/ and /etc/init.d/? More generally, what meaning does the .d suffix convey to a directory?
Olivier Lalonde
  • 57,431
  • 62
  • 125
  • 146
194
votes
9 answers

Command to list services that start on startup?

Is there a command to list services that run on startup? I imagine it would involve parsing /etc/init.d/, and the various /etc/rc.* directories.
Eric H
  • 2,043
  • 2
  • 14
  • 5
86
votes
1 answer

Difference between systemctl init.d and service

I am new to linux and have been testing myself using an Amazon Lightsail instance (Ubuntu 16.04 LTS). Going through the many guides I have came across, I see people using different commands to start/stop/restart/reload/status-check a service.…
Waqas Tariq
  • 1,003
  • 1
  • 9
  • 12
66
votes
2 answers

How to start and stop a service?

Possible Duplicate: What’s the recommended way to enable / disable services? Are there any other command to start stop restart service in ubuntu other than the below following. service --status-all service stop sudosysv-rc-conf
user7044
  • 3,871
  • 9
  • 33
  • 40
35
votes
4 answers

How to get rid of cloud-init?

I'm using Ubuntu 14.04 image as my base box for vagrant. Unfortunately this base box contains cloud-init which causes many problems during starting-up the machine: https://github.com/mitchellh/vagrant/issues/3860 I'm not using my machine in the…
mnowotka
  • 535
  • 2
  • 6
  • 11
33
votes
18 answers

Can't start mysql - mysql respawning too fast, stopped

Today I did a fresh install of ubuntu 12.04 and went about setting up my local development environment. I installed mysql and edited /etc/mysql/my.cnf to optimise InnoDB but when I try to restart mysql, it fails with a…
Tom
  • 4,927
  • 4
  • 25
  • 23
32
votes
3 answers

How do I set which PostgreSQL version is to be used by default?

I have 2 different versions of PostgreSQL installed on my system (Ubuntu Lucid): /var/lib/postgresql/8.4 /var/lib/postgresql/9.0 By default, when I run a PostgreSQL command such as createdb or psql, the 9.0 version is used. How do I configure my…
coffee-grinder
  • 3,875
  • 8
  • 25
  • 22
30
votes
1 answer

uninstall init.d update-rc.d remove

I installed an init.d script with this command: sudo update-rc.d mongodb defaults 98 02 I want to uninstall it, so I'm planning on running: sudo update-rc.d -f mongodb remove I'm concerned about the start and stop conditions in the installation…
ton.yeung
  • 435
  • 1
  • 5
  • 9
29
votes
6 answers

How to correctly add a custom daemon to init.d?

I've got a 3-rd party proprietary application server daemon which can be started and stopped by couple of command lines. I need this daemon to start when the system starts up and correctly stopped on system shutting down. How do I correctly…
Ivan
  • 55,987
  • 65
  • 150
  • 212
26
votes
6 answers

How to automatically restart Tomcat7 on system reboots?

I have installed Tomcat 7 on Ubuntu 12.04 LTS which runs on an Amzon EC2 instance. Now I wish tomcat should restart automatically on system reboot. I read this blog which suggest adding below script to /etc/init.d/tomcat7: # Tomcat auto-start # #…
Gaurav Agarwal
  • 11,315
  • 18
  • 50
  • 66
20
votes
2 answers

How do I set up a service?

I have a script that I would like to run as a service on my Ubuntu Server 11.04 headless box. That is, I want to have the correct files under /etc/init.d/ and to be able to control it via the service command. Is there any guide available that will…
Kent Boogaart
  • 1,068
  • 5
  • 16
  • 27
20
votes
9 answers

haproxy doesn't start

Installed a new Ubuntu 10.04 server and logging in as root I installed haproxy using apt-get. I can run haproxy directly as a daemon but when I do /etc/init.d/haproxy start nothing happens.. not even an error message. netstat -a shows nothing is…
Assaf Lavie
  • 2,153
  • 4
  • 17
  • 13
18
votes
3 answers

How to prevent Tor from starting automatically on Ubuntu server?

How do I stop Tor from starting automatically on startup? It is Ubuntu Server so I don't have any GUI.
user132607
  • 181
  • 1
  • 1
  • 3
15
votes
5 answers

Failed to start .service: Unit .service not found

I created a super basic init.d script for my python bot: #!/bin/bash # chkconfig: 2345 20 80 # description: Description comes here.... # Source function library. . /etc/init.d/functions start() { echo "starting torbot" python…
ctote
  • 525
  • 1
  • 4
  • 12
1
2 3
16 17