Questions tagged [init.d]

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

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

application runs from command line, but cannot start as init.d script - openWrt

Got a problem with my service written in C. It runs as an init.d service and has been working fine for many months on many devices. Today I've made some changes in the software and very strange thing ...
Kal800's user avatar
  • 3
0 votes
0 answers
433 views

Oracle 19c on Oracle Linux 8, dbora start script ONLY starting when chkconfig sets it to level S99. Any other level like S98, fails to start on reboot

I'm running Oracle 19c on Oracle Linux 8, dbora start script ONLY starting when chkconfig sets it to level S99. Any other level like S98, fails to start on reboot. Regardless of the chkconfig level, ...
Ryfor's user avatar
  • 1
1 vote
1 answer
579 views

start-stop-daemon: command not found . This error only occurs at boot time in a cron job

I have scheduled an @reboot cron job to start a service in /etc/init.d After boot, service is not started when I reach shell command line. The contents of /var/log/cron show the following, 2022-09-...
Ksenia Semenova's user avatar
0 votes
2 answers
2k views

Monit restart process behavior

Monit's documentation states the following for the restart action : RESTART restarts the service and send an alert. Restart is performed by calling the service's registered restart method or by first ...
Ror's user avatar
  • 323
3 votes
1 answer
17k views

systemd failing enable with "service is transient or generated". What's wrong with this configuration?

In General I've been scouring the web looking for actually helpful documentation about systemd and this error, but the majority of it has been troubleshooting niche cases or goes into such extreme ...
noket's user avatar
  • 31
0 votes
1 answer
312 views

Create init.d Apache service for multiple instances on debian

I am trying to install a second instance of apache on debian. I used the multiple instance script. during the installation it says: root@nextcloudpi:/usr/share/doc/apache2/examples# sudo sh setup-...
Stephane's user avatar
0 votes
1 answer
171 views

type -p java does not work in a init.d script

I am trying to modify /etc/init.d/jenkins script, in order to add my custom java path. My solutions is this: JAVAPATH=$(type -p java) PATH=/bin:/usr/bin:/sbin:/usr/sbin:$JAVAPATH However, when I ...
Javier Cimas's user avatar
1 vote
0 answers
530 views

init.d and remote files systems

The Linux Standard Base Core Specification, 22.4. Installation and Removal of Init Scripts says: An init script shall be installed in /etc/init.d (which may be a symbolic link to another location), ...
Ian W's user avatar
  • 239
0 votes
1 answer
137 views

init.d kills my mongod process due to respawning

I'm using Ansible to start the mongod service on a Centos 6.8 VM. The task is pretty straightforward: - name: Start mongod service service: state: started name: mongod However the service ...
Andrew Fielden's user avatar
0 votes
0 answers
583 views

How do I get init.d to respawn a crashed process if the lock file exists?

I'm running a mongod process on my Centos 6.8 box, and I want to provide some level of resilience in the event of process death. So I created an entry in my /etc/inittab - md:2345:respawn:/usr/bin/...
Andrew Fielden's user avatar
0 votes
0 answers
812 views

Tomcat does not shut down correctly with init.d script on system-shutdown - restart prevented

I want to start Apache Tomcat 7 on my Redhat 7 server (RHEL7) automatically at system startup. In order to do that, I did the following steps: creation of the following init.d script and make it ...
raspberry_basti's user avatar
0 votes
1 answer
148 views

S6 - slow startup service incorrectly starts second time

I'm using s6 (http://skarnet.org/software/s6/) in order to supervise processes. I have this working well for hundreds of processes across dozens of docker instances and servers. I have a new problem ...
richp10's user avatar
  • 121
1 vote
1 answer
297 views

Does running cron by itself have the same behavior as via the init.d script?

I'm working with some code that fires up cron on a server (which doesn't have it running at boot time). The script which starts cron sets up some logging stuff and then simply invokes cron. It doesn't ...
John Bachir's user avatar
  • 2,364
3 votes
1 answer
7k views

Create a custom /etc/init.d script in Debian 10 Buster

I need to develop an /etc/init.d script to start and stop a server (binary executable) in Debian 10 Buster. Whereas in earlier versions of Debian, you would write a complete shell script that issues ...
tcdaly's user avatar
  • 95
2 votes
1 answer
14k views

Where should init scripts be placed in Amazon Linux 2?

In the Amazon Linux 2 release notes, Amazon advises that initscripts should no longer exist in /etc/init.d Amazon Linux 2 uses the systemd 219 init system to bootstrap userspace and manage system ...
Jonathan's user avatar
  • 1,309
0 votes
0 answers
1k views

Running td-agent (fluentd) init.d script under Supervisor got (spawn error)

I have installed td-agent and they provide an init.d script that you can run it with, I have configured td-agent and I run it via the init.d script and it's running smoothly, but I want to move td-...
Iliyass Hamza's user avatar
2 votes
0 answers
2k views

How do I increase open file limit for nginx's master process on Ubuntu 14.04 LTS?

Not a dupe: This is not a duplicate of this question. I've already looked into that question. That helps with raising the limit for worker processes, but the nginx master process continues to retain ...
Hassan Baig's user avatar
  • 2,395
0 votes
1 answer
3k views

Creating /etc/init.d startup script

I have simple /etc/init.d/myscript startup script in my Debian squeeze that just logs to file: echo "starting init.d script" >> /opt/aaa/starting.log I did all actions to register script: ...
vico's user avatar
  • 99
0 votes
1 answer
310 views

Run php script artisan opcache:optimize after php7.2-fpm start or restart

I want to run php /path/to/artisan opcache:optimize to build laravel cache after php7.2-fpm start or after restart. I have tried to insert it on /etc/init.d/php7.2-fpm in do_start() method but ...
Hernawan's user avatar
0 votes
1 answer
241 views

linux, daemon startup, determine if launched by initd or user

in my /etc/init.d/blabla script, which is the correct way to determine if the system is booting or the user root is runnig the script ? I am thinking about * parent pid * euid * terminal... pts ?
Massimo's user avatar
  • 260
0 votes
1 answer
9k views

Postgresql wont start anymore

Debian 9.5 - postgresql cluster 9.4. It's not a fresh installation - it was a perfectly decently running system, until I tried restarting the service all commands: /etc/init.d/postgresql start and ...
RazorHail's user avatar
  • 165
0 votes
1 answer
581 views

Amazon Linux 17.09 init.d script not starting when Docker does

I'm probably missing something really silly, but does anyone know why this init script isn't running when Docker starts on Amazon Linux 17.09? #!/bin/sh ### BEGIN INIT INFO # Provides: ...
laverya's user avatar
4 votes
1 answer
6k views

Restarting Puma using init.d

I have Puma installed and running as a web server for a production Rails site, using Nginx as a reverse proxy. I want to use init.d to manage the services for both Nginx and Puma. It appears to me ...
Turgs's user avatar
  • 285
4 votes
0 answers
3k views

Postgresql fails to start with no such file or directory error?

I was juggling Postgresql versions and I think I shot myself in the foot during the renaming of something. I have 9.3 and 9.4 installed on an Ubuntu 14.04 station, and I wanted to go back to 9.3 so I ...
Robert Oschler's user avatar
2 votes
1 answer
183 views

Are these two commands to kill a process effectively similar?

I'm looking at some init.d scripts, and a number of them use this what is essentially this command in their "stop)" target: kill $(pidof ${DAEMON_NAME}) The pidof ${DAEMON_NAME} is actually a script ...
Jamie's user avatar
  • 1,284
0 votes
2 answers
1k views

`pidof` check on host fails when docker container runs same app (e.g. apache2)

The apache2 init script does a pidof check to detect if apache is already running. if pidof $DAEMON > /dev/null 2>&1 ; then if [ -e $PIDFILE ] && pidof $DAEMON | tr '...
tudor -Reinstate Monica-'s user avatar
1 vote
2 answers
5k views

init script for zookeeper

i have seen that the developers of zookeeper have a great zkServer.sh script to start,stop, restart etc zookeeper, but i have no idea why in the world they decided to skip init script to use. With ...
uberrebu's user avatar
  • 503
1 vote
1 answer
767 views

Does systemd allow for functionality like authbind? Where you can allow a non-root user to bind to a priv port?

Does systemd allow for functionality like authbind? Where you can allow a non-root user to bind to a priv port? I looked through the manpage and did quite a bit of googling, couldn't find an answer. ...
Jonathan S. Fisher's user avatar
4 votes
1 answer
2k views

Is there a way to control filesystem access with systemd?

So I'm diving into the intricacies of systemd and it's ability to meter resources with cgroups like cpu, io, and memory. Is there also a way to control the directories a process has access to with ...
Jonathan S. Fisher's user avatar
2 votes
2 answers
8k views

missing start-stop-deamon on centos 6.8

I am trying to run node_exporter for prometheus on centos 6.8. Here is the init.d script I was able to create: #!/bin/sh ### BEGIN INIT INFO # Provides: Node exporter # Required-Start: ...
Mher Harutyunyan's user avatar
0 votes
1 answer
739 views

Init scripts and shutdown order in centos

My current issue is that I have a process hanging from supervisord that I want to make sure it gracefully sending network exists etc.., but by the time supervisor is brought down there is no network. ...
Arkaitz Jimenez's user avatar
5 votes
0 answers
3k views

How to set TeamCity Command Line Runner default shell?

I'm starting my TeamCity agent on Ubuntu 15.10 via an init.d script like so: #!/bin/sh ### BEGIN INIT INFO # Provides: TeamCity Build Agent # Required-Start: $remote_fs $syslog # Required-...
Mario Tacke's user avatar
1 vote
1 answer
3k views

systemctl unable to start red5 init.d script on ubuntu 16.04

I tried to build and install systemd script for red5-server on ubuntu 16.04 server. I found the sample init.d script at https://gist.github.com/akarambir/a40163f163ae8b131be8 and downloaded I named ...
Sencer H.'s user avatar
  • 562
1 vote
0 answers
753 views

Debian 8/init.d: start daemon after "$named" is ready

I am trying to start a init.d daemon on Debian 8 after network and DNS is up and running. That's the script I am using: ### BEGIN INIT INFO # Provides: local_daemon # Required-Start: $all ...
noblemaster's user avatar
1 vote
2 answers
2k views

Systemd PHP start script Centos 7

I have a PHP script I'm trying to create a service for. I've created the service however I can't get it to start. The weird thing is, the exact same service UNIT works on my other server of the same ...
Panama Jack's user avatar
0 votes
1 answer
2k 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 ...
Pradyut Bhattacharya's user avatar
0 votes
1 answer
859 views

CentOS 7 Converting multiple process init script to systemd service

I have an init script as you see below #!/bin/bash # description: connect start | stop | restart | install # processname: tomcat # chkconfig: 234 99 01 JAVA_HOME=/ export JAVA_HOME PATH=$JAVA_HOME/...
Firat Yilmaz's user avatar
3 votes
1 answer
3k views

openvpn post-up script fails with “Operation not permitted” if and only if openvpn is run by systemd

I have this post-up script that is run by openvpn: #!/bin/bash echo "I am: `whoami`" echo "Moving interface into the netns" ip link set dev "$1" up netns hydrogenvpn mtu "$2" echo "Listing" ip netns ...
Valentin Lorentz's user avatar
1 vote
0 answers
31 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 ...
Piduna Valeriu's user avatar
1 vote
0 answers
531 views

Nginx at startup does not have fd limit set in /etc/security/limits.conf

I have the following configuration for increasing the number of file descriptors available to processes of all users. cat /etc/security/limits.conf * hard nofile 65536 * soft nofile 65536 When the ...
Anas Alkhatib's user avatar
0 votes
2 answers
6k views

How to make ip route settings persistent in CentOS?

I need to route the outgoing traffic via a virtual ip address. I can do this using the 'ip' tool from the iproute-package. Using ip route I can see which address is used as the source and I can ...
user3849013's user avatar
0 votes
1 answer
1k views

Ubuntu 16.04, PHP-FPM times out at boot with libsodium-php module

The Issue (Modified: with REPRO STEPS!) To repro, spin up a new VPS with Ubuntu 16.04 (probably works with any Debian distro, but not tested) and follow these instructions: Through experimentation I ...
stevendesu's user avatar
6 votes
2 answers
8k views

Parse error in sudoers file

I've created a user called kafka to whom I am trying to give a sudo access to run only /etc/init.d/kafka commands. I added the following entry to /etc/sudoers.d/kafka via Ansible: kafka ALL = ...
jeffreyveon's user avatar
  • 3,255
6 votes
2 answers
23k views

Start PHP-FPM with root option automatically

I was trying to get PHP-FPM running a pool as root, but I can't seem to adjust the init.d startup params. It works when starting PHP-FPM from the CLI (with sudo php-fpm7.0 -DRy /etc/php/7.0/fpm/php-...
redelschaap's user avatar
60 votes
6 answers
106k views

"reboot" or "shutdown -r now": what restart command is safer?

We have in our organization around ~500 RedHat Linux machines. On all the machines we installed applications and services under /etc/init.d, and oracle RAC servers. We intend to perform yum updates ...
dandan's user avatar
  • 1,081
2 votes
2 answers
9k views

Ansible cannot check service status and restart it

I am new in ansible. Now I try to restart my Tomcat service. It looks like ansible cannot detect service status (started/stopped) and cannot (re)start it. Please tell how to do diagnostic? See here (...
dev.brutus's user avatar
0 votes
1 answer
57 views

Which ssh starup script is invoked by ubuntu?

I am trying to run two sshd processes, one for admin and one for sftp. Ubuntu 14.04 on digital ocean has both upstart in '/etc/init/ssh' and init.d in '/etc/init.d/ssh`. Is this just digitalocean or ...
Jonathan's user avatar
  • 193
0 votes
2 answers
2k views

Troubleshoot if /etc/init.d script would run on startup, without actually rebooting?

I have this script in /etc/init.d that I want to know if it will be run when the system reboots. Is there a way to "simulate" the conditions of a reboot to see if the script will actually be invoked (...
jotadepicas's user avatar
2 votes
0 answers
2k views

Running an init.d startup script as a non-root user (PostgreSQL-related)

I am currently installing PostgreSQL from source on a RHEL6 system. I have generally been following the official documentation for guidance (http://www.postgresql.org/docs/9.4/static/installation....
R Law's user avatar
  • 21
1 vote
0 answers
919 views

Writing custom init script for supervisord

I am using supervisord to control my processes on Amazon Linux. I want to make use of supervisorctl inside my init script. I have the following so far. #!/bin/sh # # /etc/rc.d/init.d/supervisord # # ...
kosta's user avatar
  • 163

1
2 3 4 5 6