2022 Developer Survey is open! Take survey.

Questions tagged [init.d]

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

Filter by
Sorted by
Tagged with
1 vote
2 answers
133 views

How to stop a service when a CIFS share becomes unavailable?

I have a service that is started by a script /etc/init.d/foo. When a certain CIFS share (//fileserver/multimedia on /home/username/multimedia type cifs) becomes unavailable for any reason (unmounted, ...
user avatar
0 votes
0 answers
67 views

Reboot does not trigger the "stop" part of init.d script

I have a script that I want to execute before a machine is either shut down or rebooted: /etc/init.d/init.sh #!/bin/sh ### BEGIN INIT INFO # Provides: init.sh # Required-Start: $all # ...
user avatar
  • 101
0 votes
0 answers
31 views

Capturing login data input by user while logging onto Linux

I am trying to work on this user authentication problem where user enters the login data upon Linux boot, but the authentication takes place through a different connected device for security purposes ...
user avatar
0 votes
0 answers
256 views

fstab mount of iSCSI fails before network starts?

I have an ISCSI target that I connect to and I can mount it after the network is up and I'm logged in, but I want to use fstab to automount but the network is not up when it tries to mount. I'm using ...
user avatar
1 vote
0 answers
21 views

How do you properly fix/prevent when Systemd Units fail when binding to none local IP host/port upon system startup?

Say you have a fresh and modern Ubuntu system (say 20.04 LTS Server) installed on real hardware, and you need to deploy one or more network bound services, such as: Nginx MySQL PostgreSQL In my ...
user avatar
0 votes
0 answers
81 views

Parallel starting of services at the time of boot

I am having a bit slow boot because of many services. Services listed below (Output for sudo ls -l /etc/rc$(sudo runlevel| awk '{print $2}').d): lrwxrwxrwx 1 root root 18 Mar 21 2020 K01whoopsie ->...
user avatar
1 vote
1 answer
117 views

Restarting my web server on system reboot

I've made a simple web server with Ktor using build system Gradle. My build.gradle file applies the application plugin: application { mainClass.set("io.ktor.server.netty.EngineMain") } ...
user avatar
  • 187
0 votes
0 answers
30 views

Init.d script to let Kate/Texteditor wait for loading files from USB stick until it is mounted

I have all my programming stuff on a USB stick. Sometimes I forget to put the USB stick back in when I open up the laptop again, e.g. resume the session with the files from the USB stick open. I do ...
user avatar
  • 101
0 votes
1 answer
272 views

init.d bind9 aborting: "loading configuration: address not available"

Issue: You're running some Debian distribution, say, Ubuntu Server 18.04 or 20.04. You've specified an IP address parameter in a /etc/bind/named.conf: query-source address 192.168.30.2; listen-on ...
user avatar
0 votes
0 answers
205 views

autostart stuff is not working on lubuntu - mounts and services

I' having problem getting anything non-standard to happen on autostart - I want this PC to function as a media PC, but everytime I lose power or update, I have to manually login and do a bunch of ...
user avatar
0 votes
0 answers
26 views

Reboot the machine from an init.d service

I'm using an init.d script to launch a kiosk-like application in a xubuntu powered machine. The script looks this way: #!/bin/sh ### BEGIN INIT INFO # Provides: myapp # Required-Start: $syslog ...
user avatar
  • 143
0 votes
1 answer
80 views

How to run a script when fully booted?

I want to do something where I animate my desktop background when the computer boots up. However, I can't seem to find a way to make it run ONLY when I can see it running. When I put the script in ...
user avatar
0 votes
1 answer
233 views

I deleted and reinstalled Tomcat8, now it won't start ... says "tomcat not installed" ... how do I determine what's wrong?

I'm on Ubuntu 18.04 I "apt installed" tomcat8 and it was working fine ... until I messed up the configuration. So I "apt removed" it and manually deleted folders /usr/share/...
user avatar
  • 101
0 votes
1 answer
82 views

Unable to start monit

I want to use monit in a container to schedule some scripts to be executed as scheduled but am unable to start it. I've added /etc/init.d/monit start into the container's start file but still can't ...
user avatar
  • 133
3 votes
1 answer
1k views

Ubuntu 20.04: some services fail during boot (files missing)

I have recently updated from 18.04x to 20.04.1 LTS. All seems to work fine, except that couple of services fail during boot. Output of systemctl --failed: ● checkfs.service loaded failed ...
user avatar
0 votes
0 answers
321 views

Running init scripts concurrently

In the older versions of Ubuntu we could start the init scripts parallel with modifying the file /etc/init.d/rc. This line was necessary: : CONCURRENCY=shell In the newer version 20.04 there is no ...
user avatar
  • 1
0 votes
2 answers
314 views

Automated Driver Loading: Cron, Init, or Modprobe

Main Problem I am attempting to automate the loading of drivers for my system. The drivers were built manually and must be loaded manually. Another caveat is that one of the system drivers must be ...
user avatar
3 votes
1 answer
10k views

How to write an init script that will execute an existing start script in Ubuntu 20.04?

my question similar to: How to write an init script that will execute an existing start script? However, that question is outdated and I like to know how I can do that in Ubuntu 20.04 This my try in ...
user avatar
  • 532
0 votes
1 answer
109 views

Ubuntu 18 custom boot script to run on every boot, created manually symbolic link to the script, but still not executed

I am trying to start myscript in Ubuntu 18.04, to be executed in the boot up. For this i did the below 1) myscript is copied to /etc/init.d with proper permission as +x 2) created symbolic link using ...
user avatar
  • 111
0 votes
0 answers
161 views

Shell script in init.d not starting on boot

I have to create a devil that starts on boot. It is currently in /etc/init.d and I've created a symlink in /etc/rc5.d since my runlevel is 5, but the "start" case in the script wont start during boot. ...
user avatar
0 votes
1 answer
248 views

Bootprocess of Ubuntu 19.10

I'm trying to figure out, what the system does during its boot procedure. This is how far I came: GRUB (bootloader) → Kernel → systemd (init process) systemd checks default bootlevel/target (where?)...
user avatar
  • 381
1 vote
1 answer
890 views

Ubuntu Server 18.04 - ExpressVPN at boot

What would be the correct way to start the Express vpn client at boot detailed here Specifically; In the terminal, run the following command: expressvpn connect I would want this to run at ...
user avatar
1 vote
0 answers
334 views

script in rc3.d not executing. correct place?

Maybe it needs to go somewhere else. I need to enable all the fans to %100. The script I use works if I run from a terminal but not on boot ln -s /etc/init/setfan.sh /etc/rc3.d/S99setfan.sh ...
user avatar
1 vote
0 answers
443 views

I'd like to add a pause to a linux service, why doesn't my test work?

I'd like to make mythtv-backend pause before starting, I tried editing /etc/init.d/mythtv-backend, adding a line at start of the file echo "sleeping 100" >> /tmp/sleep_test sleep 100 It never ...
user avatar
  • 21
0 votes
1 answer
925 views

Can't perform upgrade due to failing util-linux, insserv & initscripts

Routine upgrade of 16.04.6 server has been failing with following errors: Preconfiguring packages ... Setting up util-linux (2.27.1-6ubuntu3.8) ... insserv: warning: script is corrupt or invalid: /...
user avatar
0 votes
0 answers
54 views

Is there a single init script in Ubuntu 16.04 for the invocation of the booting or separate directories?

If so, where are they located? And can the init script be modified according to the system requirements? I located the /etc/init folder and I wanted to know, since Suse has one init script, does ...
user avatar
2 votes
1 answer
6k views

/etc/init.d/rc missing in Ubuntu18.04

I would need to adapt some scripts from Ubuntu 16.04 to Ubuntu 18.04 and /etc/init.d/rc is missing in Ubuntu 18.04. This path was moved to a different one or everything was migrated to systemd? If it ...
user avatar
  • 21
0 votes
0 answers
1k views

Apache fails to start on boot (18.04)

I have an Apache installation that is falling over when called on boot from init.d: Oct 28 15:29:38 Myth systemd[1]: Starting The Apache HTTP Server... Oct 28 15:29:39 Myth apachectl[958]: (99)Cannot ...
user avatar
0 votes
0 answers
362 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 ...
user avatar
1 vote
1 answer
229 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 ...
user avatar
1 vote
0 answers
119 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-...
user avatar
2 votes
1 answer
1k 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 ...
user avatar
3 votes
1 answer
31k 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 ...
user avatar
  • 797
0 votes
1 answer
4k 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 #!...
user avatar
  • 101
0 votes
0 answers
216 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 ...
user avatar
2 votes
0 answers
63 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?...
user avatar
2 votes
0 answers
1k 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 ...
user avatar
  • 121
0 votes
0 answers
207 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/...
user avatar
1 vote
1 answer
3k 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 ...
user avatar
1 vote
1 answer
2k 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 ...
user avatar
  • 3,544
2 votes
1 answer
698 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 ...
user avatar
  • 222
1 vote
0 answers
1k 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. ...
user avatar
  • 55
0 votes
2 answers
811 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 ...
user avatar
  • 55
0 votes
1 answer
813 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 ...
user avatar
1 vote
0 answers
1k 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 "...
user avatar
  • 11
1 vote
1 answer
368 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 -- ...
user avatar
  • 257
0 votes
1 answer
63 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 ...
user avatar
3 votes
2 answers
17k 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:...
user avatar
-1 votes
1 answer
1k 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.
user avatar
  • 139
0 votes
1 answer
66 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!
user avatar

1
2 3 4 5 6