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


The shiny-server.conf file in /etc/shiny-server is the configuration file for Shiny Server and all its functionality. It is installed in the same location on all operating systems.

The other shiny-server.conf file controls the service, including startup and shutdown, and system-level controls including log levels. This file gets installed in a location determined by the initialization system on the environment. For instance, it is installed in /etc/init for systems that use Upstart to control the service, and in /etc/init.d for systems that use init.d. For systems that use systemd, this file is located in /etc/systemd/system and is called shiny-server.service. See the Shiny Server admin guide for more...

0 0
0 0

I've been managing server installations both on and off Ubuntu flavor for some time - I've become quite adjusted to /etc/init.d/ for restarting servcies. Now I get this message:

root@tatooine:~# /etc/init.d/mysql status Rather than invoking init scripts through /etc/init.d, use the service(8) utility, e.g. service mysql status Since the script you are attempting to invoke has been converted to an Upstart job, you may also use the status(8) utility, e.g. status mysql mysql start/running, process 14048

This seems to have been brought about in the latest LTS of Ubuntu - why? What's so bad about /etc/init.d/ and what/is there a difference between service and...

0 0

/etc/init.d is maintained on ubuntu for backward compatibility with sysvinit stuff. If you actually look at /etc/initd/rc.local you'll see (also from a 12.04 LTS Server):

#! /bin/sh ### BEGIN INIT INFO # Provides: rc.local # Required-Start: $remote_fs $syslog $all # Required-Stop: # Default-Start: 2 3 4 5 # Default-Stop: # Short-Description: Run /etc/rc.local if it exist ### END INIT INFO

And "Run /etc/rc.local" is exactly what it does. The entirety of /etc/rc.local is:

#!/bin/sh -e # # rc.local # # This script is executed at the end of each multiuser runlevel. # Make sure that the script will "exit 0" on success or any other # value on error. # # In order to enable or disable this script just change the execution # bits. # # By default this script does nothing. exit 0

I would guess the purpose in doing this is to provide a dead simple place to put shell commands you want run at boot, without having to deal with the stop|start service stuff, which is in...

0 0

1) If you have not yet installed DKMS run this command

sudo apt-get install virtualbox-dkms

If is already installed resintallation should fix the problem

sudo apt-get install --reinstall virtualbox-dkms

2) After the (re)installation process you should see something similar to this

vboxnetflt.ko: Running module version sanity check. - Original module - No original module exists within this kernel - Installation - Installing to /lib/modules/3.5.0-61-generic/updates/dkms/

vboxpci.ko: Running module version sanity check. - Original module - No original module exists within this kernel - Installation - Installing to /lib/modules/3.5.0-61-generic/updates/dkms/


DKMS: install completed. * Stopping VirtualBox kernel modules [ OK ] * Starting VirtualBox kernel modules [ OK ] Setting up virtualbox-qt (4.1.12-dfsg-2ubuntu0.10) ... Processing triggers for libc-bin ... ldconfig deferred processing...

0 0

You test, what runlevel your machine normally starts into.


Often this is 5 or 2 - there are various conventions, but nothing really established, afaik. Ubuntu uses 2, while former distribution I used always used

1 Single user (super user) 2 multi user 3 multi user + network 4 (don't remember) 5 multi user, network + X11

Then you make a symlink from your init-script, maybe /etc/init.d/foobar to /etc/rc2.d/SXYfoobar

S means 'Start this script in this runlevel (here: 2). XY is a two-digit decimal number, which is relevant for the sequence, the scripts are started.

If you depend on script S45barfoo to be run before you, and S55foofoo is depending on your script, you would choose xy between 45 and 55. For equal numbers the boot order is undefined.

Ubuntu meanwhile switched (is switching) to another startup procedure, called upstart.

And note: Not always the links link to /etc/rcX.d - sometimes it is /etc/init/rcX.d or something...

0 0

If you use Linux you most likely have heard of the init.d directory. But what exactly does this directory do? It ultimately does one thing but it does that one thing for your entire system, so init.d is very important. 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. Of course it's not exactly that simple.

If you look at the /etc directory you will find directories that are in the form rc#.d (Where # is a number reflects a specific initialization level - from 0 to 6). Within each of these directories is a number of other scripts that control processes. These scripts will either begin with a "K" or an "S". All "K" scripts are run before "S" scripts. And depending upon where the scripts are located will determine when the scripts initiate. Between the directories the system services work together like a well-oiled machine. But there are times when you need to...

0 0

Most UNIX systems are commercial in nature.

Linux is a UNIX Clone

But if you consider Portable Operating System Interface (POSIX) standards then Linux can be considered as UNIX. To quote from Official Linux kernel README file:

Linux is a Unix clone written from scratch by Linus Torvalds with assistance from a loosely-knit team of hackers across the Net. It aims towards POSIX compliance.

However, “Open Group” do not approve of the construction “Unix-like”, and consider it misuse of their UNIX trademark.

Linux Is Just a Kernel

Linux is just a kernel. All Linux distributions includes GUI system + GNU utilities (such as cp, mv, ls,date, bash etc) + installation & management tools + GNU c/c++ Compilers + Editors (vi) + and various applications (such as OpenOffice, Firefox). However, most UNIX operating systems are considered as a complete operating system as everything come from a single source or vendor.

As I said earlier Linux is...

0 0

In the file you put in /etc/init.d/ you have to set it executable with:

chmod +x /etc/init.d/start_my_app

Thanks to @meetamit, if this does not run you have to create a symlink to /etc/rc.d/

ln -s /etc/init.d/start_my_app /etc/rc.d/

Please note that on latest Debian, this will not work as your script have to be LSB compliant (provide, at least, the following actions: start, stop, restart, force-reload, and status): https://wiki.debian.org/LSBInitScripts

As a note, you should put the absolute path of your script instead of a relative one, it may solves unexpected issues:


And don't forget to add on top of that file:

0 0