Questions tagged [init]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
180 views

Why is technically possible for init to be a shell script?

I'm currently studying the boot process and composition of the different aspects of a GNU/Linux system and I can't rationaly explain this thing : you can write init inside an initramfs file as a shell ...
user avatar
0 votes
0 answers
181 views

Is it possible to get systemd to monitor a process that it does not start?

Some of our startup scripts have an ExecStart line that runs a curl command to start jobs from our Jenkins build server. Systemd does not know anything about the job that is started as a result of ...
user avatar
0 votes
1 answer
35 views

Is systemd right for this task?

Currently, there's a fairly complex Python script that manages several dozen processes across a few servers. Each individual process has the same setup/requirements: Main process must come up and be ...
user avatar
  • 101
0 votes
1 answer
3k views

'systemctl restart service' not working on CentOS 7

I have a custom service managed by an init script in /etc/init.d and, after upgrading to CentOS 7, with systemd, 'systemctl restart service' is not working correctly. I need to execute two times '...
user avatar
  • 83
2 votes
1 answer
5k views

whats the difference between sigkill and sigabrt? [closed]

The other day I experienced a halt in my python application with sigabrt, but I knew that the init should send a sigkill signal. I'm curious what's the difference between them, if any? Can someone ...
user avatar
0 votes
0 answers
69 views

Which init system is main on particular system?

I have installed application with several init scripts as for dpkg -L application shows. For example: /etc/init/application.conf /etc/init.d/application /usr/systemd/applaication.service But i use ...
user avatar
0 votes
1 answer
615 views

Disabling MariaDb on Debian jessie doesn't work

I have MariaDb installed on Debian jessie. I need to remove it from automatic system startup. I tried recommended commands but they did not work: root@debian:/home/gameboy# systemctl disable mysql ...
user avatar
  • 173
5 votes
3 answers
5k views

NFS server not serving share after reboot

I have two Linode containers. Box A is our general purpose web server. It occasionally needs to access Box B, which is set up as an NFS server. When Box B reboots, Box A is unable to access any NFS ...
user avatar
  • 213
0 votes
0 answers
698 views

Why corrupted rc.sysinit file create syslogd error

During boot the system hangs, and the last message while it hangs is: Starting system logger: Can't open or create /var/run/syslogd.pid. Can't write pid. After a while I discovered that /etc/init/rc....
user avatar
1 vote
0 answers
27 views

Start script are not cleared table of processes

I have a proxy server, all ok. But, i have some problems & questions. First: when i make "/etc/init.d/nginx stop" or "/etc/init.d/nginx restart", of my config, it not reload and all nginx process ...
user avatar
1 vote
1 answer
598 views

s6 supervisor: variable set with s6-envdir can't be used

I'm trying to wrap my head around s6 supervisor suite. I've figured out run and log but I'm stuck with s6-envdir and I'm not sure how do I use it. I see that environment variable gets set, but I can'...
user avatar
3 votes
1 answer
4k views

init doesn't kill zombies

I have some zombie processes on my system. I've killed the parent of those zombies hoping init will take over and free up the resources (lots of sockets in CLOSE_WAIT). However init is not removing ...
user avatar
  • 1,298
20 votes
3 answers
31k views

How to use the `$HOME` environment variable in systemd service files

I am trying to use the $HOME environment variable in the ExecStart. I tried many different things like $HOME and ${HOME} but nothing seems to be working ExecStart=${HOME}/bin/some-binary Anyone ...
user avatar
  • 331
0 votes
1 answer
773 views

rsyslogd wont start correctly on Ubuntu 14.04.4 LTS while using the Init-Script

somehow my init-script for rsyslogd does not work. I tried to enable rsyslogd to accept logging-data on udp:514. If I start my rsyslogd via Init-Script, no logging-data is forwarded. Not even syslog! ...
user avatar
  • 31
1 vote
2 answers
3k views

Unable to do a PXE boot, "no filesystem could mount root" error

I'm trying to do a PXE boot with an image I created, but after loading the image and the kernel, I get the following error message: The main error message is this: No filesystem could mount root, ...
user avatar
1 vote
1 answer
347 views

How to boot after Systemd startup into program/script

I try to write a network/environment configurator for a distributed OVA appliance, similar to what Github Enterprise does, see https://github-images.s3.amazonaws.com/enterprise/Enterprise-QS-...
user avatar
-1 votes
2 answers
1k views

Linux init script service - delay until mysql socket is ready

How does one go about delaying a service init script in Linux until the MySQL socket exists? Does the sleep command in a startup script delay the entire boot process, or are init scripts each ...
user avatar
  • 177
1 vote
0 answers
675 views

How to display init output to tty7 (or main tty)

I have created my first init script in a linux server (ubuntu if that adds any information) that checks for an update, downloads it and executes it in each hour. The init file is as follows: /etc/...
user avatar
1 vote
1 answer
1k views

What initiates parsing of the /etc/sysconfig/network-scripts/ifcfg-* interface scripts?

I have been searching for a while and looking at source code and various scripts on the Linux filesystem and still have been unable to figure out what ultimately initiates the reading of the scripts ...
user avatar
0 votes
1 answer
541 views

init / inittab respawn (count number of times it occurs) [closed]

I added the following line in my /etc/inittab to respawn a program if it crashes. #test must always run. aa:2345:respawn:/home/pi/test/test Is there a way to know how many times the init/respawn ...
user avatar
  • 113
0 votes
1 answer
2k views

Set RemainAfterExit=no for a classic init script in systemd

I run a custom service with a classic init script on Debian Jessie. Debian Jessie uses systemd. The reason that I use an init script is that I also use the same service on Debian Wheezy, which does ...
user avatar
  • 1,076
1 vote
1 answer
16k views

How to find the file location of int.d scripts in ubuntu

I need location of a init.d script. I am using service cinder-api start to start the service Other init scripts are located at /etc/init.d/ location. But this service is not found in that location , ...
user avatar
0 votes
0 answers
1k views

Missing /etc/init.d/ipsec script after installing strongswan 5.3.2 from source

Ubuntu 14.04 (Amazon's Ubuntu AMI). Installed strongswan 5.3.2 from source (latest version in repo is too old and doesn't work). 1 question: 1) Noticed that the /init.d/ipsec (or /init/) script is ...
user avatar
  • 1,021
0 votes
0 answers
152 views

How to turn off and on heartbeat service when haproxy is turned off and on?

I'd like the heartbeat service to turn off before haproxy is stopped and to turn on before it starts on a Ubuntu 14.04 Server. What is the best way to accomplish this? I'm sure one of these days I'm ...
user avatar
  • 2,463
0 votes
1 answer
71 views

Prevent init to restart services when changing run-level

When a service, most notably httpd is configured to run in level 3 and 5 (on CentOS 6.5) and the current run-level is 3 and I move to 5 by init 5, then init restarts httpd which is silly IMHO. Is ...
user avatar
  • 121
80 votes
7 answers
213k views

Best way to disable swap in Linux

I am running a custom compiled 3.18.9 kernel and I am wondering about the best way to disable swap on the system. I also use init if it makes a difference. Is it enough to comment or remove the swap ...
user avatar
1 vote
1 answer
1k views

systemd Unit file for GitLab

I am currently writing a Puppet module to get GitLab running on CentOS 6/7. For the CentOS 7 install I need to write a systemd unit file to start the gitlab service (which is actually Unicorn & ...
user avatar
  • 211
3 votes
2 answers
9k views

How to respawn a script in RHEL/Centos6 when /etc/inittab has been deprecated?

I have a custom init script and I want that script to be respawned if in case the process dies. In RHEL/Centos 6 /etc/inittab is deprecated. So how should I ensure the process will be respawned?
user avatar
1 vote
1 answer
285 views

init process' nice level

The init process on a Debian server (VPS) I've inherited has its nice value set to +10. There's nothing particularly obscure installed on the system. It has a LAMP stack and does a lot of IO and will ...
user avatar
  • 111
-1 votes
1 answer
60 views

Auto starting rc at startup

So here are the steps i am following . So i add a conf file inside /etc/init.d/myconffile And then to get System start/stop links i have to use the command sudo update-rc.d myconffile defaults 99 ...
user avatar
  • 1
1 vote
0 answers
63 views

Init script to run overlapping servers at service restart

How can I create a init script that starts (and tracks) the new process before the old is completely terminated at restart? I am developing a node.js service that needs to be able to restart ...
user avatar
  • 131
1 vote
1 answer
485 views

Script before shutdown with network on

I need to generate a SMS / Email alert when the server´s UPS is finishing its charge. We have a car battery connected to the motherboard that works as a UPS (http://www.mini-box.com/M2-ATX-160w-...
user avatar
  • 137
1 vote
1 answer
1k views

Solaris 10 init failing to reap zombie processes

ps currently shows 17617 zombie processes, all of which have a ppid of 1/init. init should be reaping these defunct processes, but isn't for some reason. The number of defunct processes is growing. ...
user avatar
  • 6,798
16 votes
5 answers
23k views

Standard or best way to keep alive process started by init.d

I'm looking for a standard way or best practice to keep a daemon started by an init.d shell script alive. Or even better, is there a way to keep it alive directly from /etc/init.d? Specifically, I ...
user avatar
2 votes
2 answers
18k views

Server won't boot, kernel panic - not syncing

After a reboot of a CentOS 6.2 server we are getting a kernel panic with the following error: Kernel panic - not syncing: Attempted to kill init! Panic occurred, switching back to text console When ...
user avatar
1 vote
1 answer
41 views

(initscripts) Execute a command, if the command does not complete in 10 seconds, run another

On (Debian) Linux I want to: Execute a command. If the command doesn't complete in 10 seconds, kill it and try another command. The use-case is: I have a daemon service which I would like to shut ...
user avatar
0 votes
1 answer
1k views

Removeing ulimit from boot / init

In CentOs as from version 6 there is a by default process limit 1024 for every user i.e /etc/security/limits.d/90-nproc.conf * soft nproc 1024 I have to execute a backend service/...
user avatar
5 votes
2 answers
985 views

Is it safe to change runlevel inside a cron script?

I want to do a nightly "hotclone" of server A to server B. It's recommended that server B be running minimal daemons during this action so I want to create a "minimal" runlevel which pretty much only ...
user avatar
  • 394
0 votes
0 answers
745 views

setuid upstart not working

I have created a .conf file in which I include setuid mario setgid mario in order to run as mario user. The program I run in the exec command is forever which runs an instance of node which ...
user avatar
  • 127
1 vote
2 answers
1k views

why docker not executing init as lxc

Docker is not running init. So services are not started during startup. Lxc runs init during lxc-start.Since Docker is using lxc why it is not running init. What are the advantages of not running init ...
user avatar
  • 219
2 votes
1 answer
962 views

Waiting for devices to come up on Debian boot

I'm running OpenVPN and dnsmasmq on my wheezy system. Dnsmasq is only necessary for VPN and local users, so I don't want it to listen on all devices (yes, there is also a firewall, anyways). When ...
user avatar
  • 123
1 vote
1 answer
1k views

How to supply custom init script to Azure instance

Is it possible to create an instance specific init script and pass it to a virtual machine that is created via the API of Microsoft Azure? I know this from AWS, but could not find a way to do this on ...
user avatar
0 votes
2 answers
94 views

This script won't execute on startup, ideas?

The distribution is RHEL 5. The script has been added to chkconfig like so: # chkconfig --add script # chkconfig script on But it refuses to start when taking up the machine, what could be the ...
user avatar
  • 3
1 vote
1 answer
2k views

(Debian) Init script auto respawn? [closed]

I created a service script in /etc/init.d (Debian) that is working - I can start/stop/status/restart. But it is not respawning. Is it possible to respawn? Thanks in advance
user avatar
  • 113
10 votes
2 answers
14k views

Permanently Disable Init Service

I just provisioned a new VPS running CentOS 6, and it comes with Apache. I want to disable Apache, because I will be using Nginx instead. I know I can just delete the script in /etc/init.d/, but I ...
user avatar
1 vote
2 answers
3k views

Ubuntu Crontab or init script startup [duplicate]

What am I doing wrong here with cron on boot? Example: To launch manually: screen -S example ./script.sh To recover manually: screen -x example now, I just try to do the same thing (well, the ...
user avatar
  • 529
10 votes
5 answers
25k views

runit - unable to open supervise/ok: file does not exist

I'm trying to figure out why runit will not boot or give me the status for the managed applications. Running on Ubuntu 12.04. I created /service, /etc/sv/myapp (with a run script, a config file, a ...
user avatar
5 votes
1 answer
9k views

systemd to wait for command to complete before restart/shutdown or killing other processes

When I'm initiating "reboot" or "poweroff", systemd is killing all the processes, but I need it to wait for one particular application to finish before stopping other services. Actually, I want ...
user avatar
  • 4,351
1 vote
0 answers
290 views

Ubuntu: An init script that requires mysql

We have built some software that connects to MySQL and should be started on an Ubuntu server at boot. What we're missing is how to ensure it starts at boot after MySQL. Our init script includes the ...
user avatar
  • 113
0 votes
1 answer
1k views

What is the "best" `start on` value for an Upstart (init) scripts?

I often see start on runlevel [2345] in Upstart init scripts, but sometimes (e.g., here) I see other events being used to determine start time. How do I know which events (or status codes) should be ...
user avatar
  • 2,653