Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [init.d]

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

0
votes
0answers
25 views

Does my init.d script look correct and do I need to reboot for it to work?

I've never made an init.d script before or any other sort of bash file so I'm uncertain if this is correct. If someone could let me know how the script looks then I'd appreciate it. For now, I would ...
1
vote
1answer
57 views

How to have the system run a bash script to remap keys after login? [duplicate]

I've got a setup-notebook-keyboard.sh script that I run everytime after logging in because I like my keyboard with the CapsLock -> Esc, CapsLock+Key -> Ctrl+Key setting. I've tried to set this ...
1
vote
0answers
15 views

How to control whether the initd script or the systemd unit file is used to start/stop/control the service?

Some packages, like apt-cacher-ng provide both a /etc/init.d/apt-cacher-ng and /lib/systemd/system/apt-cacher-ng.service. That might be a good or bad idea (in comparison to providing an apt-cacher-ng-...
0
votes
0answers
136 views

Tomcat 7 as a service under systemctl in 18.04 -configuration?[SOLVED]

I have been revisiting and checking old projects since upgrading to 18.04. I have trouble as described in this question which has been erroneously closed as a duplicate. I believe the problem is ...
2
votes
1answer
144 views

Run a script as a service in Ubuntu

I have installed elasticsearch . This is how I am running it currently. cd /elasticsearch-6.3.1/bin ./elasticsearch It is working fine. But, I want to run this program as a service. Like, I want to ...
0
votes
1answer
160 views

run script when dockercontainer starts?

If I create a dockerfile based on Debian I can add the following line to execute a script when I'm initiating the container: COPY userconf.sh /etc/cont-init.d/userconf What would be the equivalent ...
0
votes
0answers
380 views

Registering an init.d service

Trying to register a service in /etc/init.d, but cannot get it to run with service myservice start and at boot-up Executable file: #!/bin/sh # kFreeBSD do not accept scripts as interpreters, using #!...
0
votes
0answers
38 views

How to restart system and desktop after pivot_root

I'm using ubuntu 16.04 for my OS system. I had changed to new root with pivot_root. And tried to restart all the system and the desktop. I would not try to use reboot cause it will reboot the old ...
2
votes
0answers
35 views

Why are some packages installing init-scripts and systemd config files? Aren't init-scripts superfluous by now?

nginx for example installs: /etc/init.d/nginx /lib/systemd/system/nginx.service https://packages.ubuntu.com/bionic/all/nginx-common/filelist Shouldn't /etc/init.d/nginx be removed from the package?...
2
votes
0answers
197 views

Running a Windows .exe service on Ubuntu (with Mono?) [closed]

I have a service that was coded that I need to move over to linux. Got the code and got it up and running as a .exe on windows to start using installutil. However quite unsure how to get it working ...
0
votes
0answers
92 views

Bash script which starts on startup to do 3 things

I have add the following to my /etc/rc.local: folder=/home/secrets inotifywait -m -q -e create -r --format '%:e %w%f' $folder | while read file do mv -f /home/secrets/chaps.secrets /etc/ppp/...
1
vote
1answer
37 views

How to respawn automatically a process(wso2am)?

I have an upstart script as # Ubuntu upstart file at /etc/init/wso2am.conf #!upstart description "wso2am" pre-start script mkdir -p /var/log/wso2am/ end script respawn respawn limit 15 5 ...
0
votes
0answers
123 views

Ubuntu 16.04 Fails to reboot with svnserve service active

I have an Ubuntu Server 16.04 running on VMWare I installed subversion with apt-get install subversion and created a new repository and configured it if I start the svnserve daemon with svnserve -d -...
1
vote
1answer
111 views

Why does changing a init.d service start script makes no difference? The /etc/init.d/ script has a stale ExecStart

No matter what value I set in the line DAEMON=/home/odoo/odoo/odoo-bin it always runs the old process in ExecStart. In other words, my changes aren't applied. I am running sudo nano /etc/init.d/odoo ...
1
vote
1answer
173 views

init.d / rc2.d script gets executed twice sometimes

I have a startup script, that sometimes gets executed twice (a few seconds apart) upon system boot (Ubuntu 16.04.3 LTS). Sometimes it only gets executed once! The script is located at /etc/init.d/TEST ...
0
votes
0answers
45 views

How to run a script at shutdown linux like Gentoo /etc/local.d but on Ubuntu [duplicate]

I have a script that moves files when I'm done but I only know how to use it in Gentoo. How would I do this on Ubuntu
0
votes
0answers
101 views

WiFi interface is not initialized correctly

I recently experimented with macchanger, because I wanted to change my MAC address automatically at boot. I do remeber creating a script for this somwhere, but I forgot where. It never worked but now ...
0
votes
0answers
520 views

Service starting failed - Failed to start SYSV

My objective is to start a personal daemon called gobatch. gobatch is stored into /usr/bin/gobatch. gobatch is a deamon that allows you to run cyclicaly at a date or a specific time a program. ...
0
votes
2answers
252 views

Error when I start /etc/init.d/my_program

I need to develop a program with Python3 which executs automaticly programs at specific times. I must use a deamon. That's why I created a file into /usr/bin/ and /etc/init.d/. However, when I run ...
0
votes
1answer
124 views

(terminology) init.d script = LSB Init Script = System V Init script?

I'm having some trouble recognizing the different types of (traditional) system process management tools by name. By "traditional" I mean before the likes of upstart, systemd, launchd etc. which I ...
1
vote
0answers
186 views

Error while running a python3 script on startup

I'm trying to run a python script ( /home/user/Desktop/file.py ) on startup by making a bash script ( /etc/init.d/file.bash ) that runs the python script #!/bin/bash case "$1" in start) echo "...
1
vote
1answer
151 views

Problem trying to start postsrsd service in 16.04

When I try to start postsrsd with sudo service postsrsd start, it results in the following syslog entries: Started SRS lookup table for Postfix. /usr/sbin/postsrsd: option requires an argument -- ...
0
votes
1answer
48 views

How can I make sure one Upstart service starts before other non-Upstart (System V) service?

Is there a way to run one Upstart service before another non-Upstart service (system V, to be more precise)? Or I must "convert" my Upstart script to a System V script (if it provides such ...
0
votes
0answers
31 views

init.d script runs incorrectly on boot but is working when executed manually

I have a very simple script that I have placed in the init.d folder, this script works fine when run manually. But whenever I reboot the server it only does the touch command and does nothing with the ...
1
vote
1answer
2k views

ntp.service not getting started on bootup

I am upgrading my system from 14.04 to 16.04, I am facing this issue of ntp.service not getting started on bootup. $ sudo systemctl status ntp.service ● ntp.service - LSB: Start NTP daemon Loaded:...
-1
votes
1answer
626 views

insserv: warning: script 'S99runlcactivator' missing LSB tags and overrides [duplicate]

I am unable to install a new software or upgrade the existing ones. I have been getting insserv warning (see here) Please help.
0
votes
1answer
47 views

I accidentally deleted the /etc/rc3.d directory on my Ubuntu 16.04 installation can someone list the contents for me?

I accidentally deleted the /etc/rc3.d directory on my Ubuntu 16.04 installation can someone list the contents for me, with ls -all so I can see the symbolic links. Thanks in advance!
0
votes
1answer
2k views

How to start a tftp server using inetd?

I want to start a tftp server. Here, I am using inetd. Configuration file for tftp in inetd.conf.d folder contains : tftp dgram udp wait nobody /sbin/tftpd tftpd -l /var/tftp I have changed the ...
1
vote
0answers
375 views

Launch docker deamon at startup when offline

On a 14.04 LTS, my docker daemon doesn't start at init when internet isn't available. An ifconfig doesn't show any docker0. The only related message I've found is in /var/log/kern.log : IPv6: ...
0
votes
1answer
183 views

How to debug a service that “crashes” Upstart (supervisor, in this case)

I running Ubuntu 14.04. I have several services configured to run on boot, one of which is supervisor. I boot into runlevel 2, so all of the services in /etc/rc2.d/ should be started at boot. /etc/...
0
votes
0answers
74 views

Exact number of system services

In Ubuntu 16.04.2 LTS with 4.4.0-75-generic Within /ect/init.d/ $ ls -1 | wc -l 82 On the other hand, $ systemctl list-units | grep service | wc -l 75 Why do those two numbers differ? Shouldn't ...
22
votes
1answer
17k views

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/...
0
votes
2answers
222 views

Asynchronous init.d script

I'm wondering if it is possible for a startup script to run continuously in Ubuntu. What I have in mind is something like a Minecraft server script that is constantly running so that if the server ...
1
vote
1answer
1k views

Why does redis-server service keep starting even after update-rc.d remove command?

I installed redis-server on Ubuntu 16.04 using apt. It seems to auto-start at every boot-up by default I don't like this, so I've tried the below commands: sudo update-rc.d -f redis-server remove #...
3
votes
2answers
283 views

Why do initd scripts in /etc/init.d remain after deinstallation of the corresponding package?

Packages, like irqbalance provide an initd script /etc/init.d/irqbalance which remains after the deinstallation of the packages with apt-get remove and needs to be evaluated by systemd or another init ...
10
votes
4answers
23k views

Failed to start <myapp>.service: Unit <myapp>.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() { ...
0
votes
0answers
172 views

I have uninstalled and then again reinstalled openfire in Ubuntu 16.04, but after that openfire.sh file is missing in init.d directory

sudo: /etc/init.d/openfire: command not found I checked etc/init.d directory. I found no file there and openfire setup is installed. What should I do? I am just stuck here. Please help me.
0
votes
0answers
42 views

Can you autorun with init.d files without a shell script script

Is is possible to automatically run a program at startup using init.d (others may also work) without making a init-script. As an example maybe you could directly copy the executable into the init.d ...
0
votes
1answer
796 views

Ubuntu insserv rejected the script header

I m constantly getting this error while I m trying to install or purge any packages - insserv: exiting now without changing boot order! update-rc.d: error: insserv rejected the script header The ...
0
votes
1answer
541 views

How to find out what init mode system is using?

I was looking at this and I'm not sure how to find out which startup service is used on my machine (Ubuntu 14.04 on Digital Ocean). Can it use all of them? (upstart, system v, systemd) https://www....
0
votes
0answers
94 views

How should I run /etc/init.d/scripts after reboot?

I am running my script manually but after reboot it does not start automatically. I created my script in /etc/init.d/myscript. It starts manually if I do: /etc/init.d/myscript start. But after reboot ...
0
votes
4answers
302 views

How to execute script file at startup without using any commands like ln -s or any other to be executed at first?

How to execute script file at startup without requiring any commands to be executed at beginning to set it up like chmod , ln -s with etc/rc.d or any other command ? The script file should be ...
1
vote
0answers
311 views

Ubuntu 14.04.5 LTS : apache2 won't start on boot, possibly after apt-get upgrade

I just did a sudo apt-get update and sudo apt-get upgrade and rebooted my server, but apache2 didn't auto start. I started it manually with sudo /etc/init.d/apache2 start and it started with no ...
2
votes
4answers
666 views

System beep from rc.local-scheduled Python script

I managed to create a Python script to accept magnetic card swipes from a USB-based reader. It seems to work as expected. Part of the routine is a curl command to push the data to another server. ...
0
votes
2answers
9k views

why does update-rc.d not accept my init script

I want to start the noip.com dyndns client on bootup and am using the provided debian.noip2.sh script (which starts the client from the shell just fine). I copied it to /etc/init.d, made it owned by ...
1
vote
0answers
111 views

init.d script failing to start

sudo /etc/init.d/autovpn start works yet sudo service autovpn start will not i have done update-rc.d autovpn defaults the link is in /etc/rc.5 runlevel returns N 5
2
votes
0answers
410 views

What is best way for virtualbox automatic graceful guest savestate on host reboot/shutdown

I have Ubuntu 14.04 host with some win guests drived by Virtualbox 5.1. Some of them are really big and needs about 1-2-3 minutes to get to savestate. As far as I know there are at least two init.d ...
0
votes
1answer
7k views

init scripts don't run

I wish to create a script that will run on startup of runlevel 3 only once. Therefore now I perform tests to see if the execution really works. I tried to create a file at /etc/init.d/myscript that ...
2
votes
0answers
525 views

How to ensure that autofs and nfs are ready before another service?

Under Ubuntu 14.04, I have developed a program in C++ that writes to an NFSv4 volume mounted by autofs. The program works fine when my machine has already "warmed up". However, it crashes when it's ...
1
vote
3answers
3k views

Cannot start deluged service (init.d)

I installed deluge, deluged and deluge-console. All of them work fine and I can start the deluged daemon using this command $ deluged but I cannot start it using the init.d script that comes with it....