Questions tagged [init.d]

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

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

288 questions
1
vote
1 answer

Debian package with init.d without autostart

I'm trying to create a package which contains the init.d file, but doesn't try to start the daemon right after the installation. Currently, I'm using scripts created from the dh_make template. Right after installation, dpkg wants to start the…
viraptor
  • 1,264
  • 6
  • 21
  • 40
1
vote
1 answer

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 use /etc/init.d/cron or service cron…
John Bachir
  • 2,344
  • 7
  • 29
  • 37
0
votes
0 answers

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-agent to be running under Supervisor, I have reread…
0
votes
1 answer

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: sudo chmod +x myscript sudo chown root:root myscript sudo…
vico
  • 99
  • 2
0
votes
1 answer

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 failed the code didn't execute. please any idea? thanks
Hernawan
  • 61
  • 8
0
votes
1 answer

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
  • 260
  • 3
  • 13
0
votes
1 answer

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 service postgresql start and systemctl start…
RazorHail
  • 165
  • 1
  • 8
0
votes
1 answer

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: replicated-docker # Required-Start: docker #…
laverya
  • 1
  • 3
0
votes
2 answers

`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 ' ' '\n' | grep -w $(cat $PIDFILE) > /dev/null 2>&1 ; then …
0
votes
1 answer

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. I've tracked this to the /etc/rc0.d/ folder in…
0
votes
1 answer

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 full log is like - Removing clamav-freshclam…
0
votes
1 answer

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/bin:$PATH export PATH CATALINA_HOME=/ ulimit -v…
0
votes
2 answers

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 change it using ip route change, but this is temporary…
user3849013
  • 1
  • 1
  • 1
0
votes
1 answer

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 boiled down the instructions to the absolute…
stevendesu
  • 113
  • 9
0
votes
1 answer

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 all 14.04? Which one launches sshd? And which…
Jonathan
  • 193
  • 1
  • 7