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 a Linux system.

0
votes
1answer
33 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 ...
0
votes
1answer
16 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 ?
0
votes
1answer
190 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 ...
0
votes
0answers
59 views

Php-fpm from php.earh repos over Alpine Linux VM: Unable to create the PID file

I have installed php-fpm7.2 from php.earth repositories by following the instructions and running the command: sudo apk add php7 php7-fpm Then when I launch the php-fpm directly as: sudo php-fpm I ...
0
votes
0answers
152 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: ...
0
votes
0answers
318 views

systemctl start order init script issue

I try to start myapp after MySQL. Inside /etc/init.d/myapp I put this to start myapp after mysql and postfix: ### BEGIN INIT INFO # Provides: myapp # Required-Start: $remote_fs $syslog $...
0
votes
1answer
550 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 ...
0
votes
0answers
28 views

`invoke-rc.d myscript start` does nothing, works when executed directly

I copied and pasted a working /etc/init.d script from my old VPS to a new one. Then I did chmod +x /etc/init.d/myscript chown root:root /etc/init.d/myscript update-rc.d myscript defaults update-rc.d ...
2
votes
0answers
1k 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 ...
2
votes
1answer
50 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 ...
0
votes
2answers
163 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 '...
1
vote
2answers
2k 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 ...
1
vote
1answer
227 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. ...
3
votes
1answer
121 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 ...
1
vote
1answer
2k 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: ...
0
votes
1answer
375 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. ...
2
votes
0answers
917 views

Howto 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-...
0
votes
1answer
2k 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 ...
0
votes
0answers
141 views

Crashplan init script for non root user

I just installed Crashplan 4.8.0 on Ubuntu 16.04.1 as a non root user (user crashplan). To start crashplan after a reboot I placed the following script in /etc.init.d (and a symlink from rc5.d): #!/...
1
vote
0answers
178 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 ...
0
votes
2answers
536 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 ...
0
votes
1answer
1k 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
329 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/...
3
votes
1answer
624 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 ...
1
vote
0answers
22 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 ...
1
vote
0answers
198 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 ...
0
votes
2answers
3k 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 ...
0
votes
1answer
790 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 ...
6
votes
2answers
3k 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 = ...
3
votes
2answers
7k 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-...
41
votes
6answers
34k 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 ...
2
votes
2answers
3k 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 (...
0
votes
1answer
33 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 ...
0
votes
2answers
461 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 (...
1
vote
0answers
770 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....
0
votes
0answers
153 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 # # ...
1
vote
1answer
103 views

Run command in screen when LSB initscript stopped

I'm trying to get a Bukkit server to run inside a screen as a service, started from an LSB script but I cant get it to stop correctly. What I essentially want it to do is reattach the screen and send ...
1
vote
2answers
370 views

Running a service as root in RHEL 6

I am trying to force Kibana to listen on port 80 therefore it needs to run as root. How can I do this? The init script is as follows: #!/bin/sh # Init script for kibana # Maintained by # Generated by ...
4
votes
0answers
335 views

redis-server2 is start-stop-daemon: warning: this system is not able to track process names longer than 15 characters

So I've had the need of running 2 instances of redis in the same server. My server is an Ubuntu 14.04 box. So I followed this guide, but not in a strict way. I mean, instead of modifying redis init ...
1
vote
0answers
437 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/...
1
vote
1answer
393 views

Order of services using systemd and legacy init.d services

On my Fedora 23 system a database is started by systemd. Another service (hive-metastore) that depends on that database ist started through a init.d script. I'am unclear about what would be the ...
2
votes
2answers
1k views

MySQL doesn't start after upgrading to Debian Jessie

I have a server with Proxmox 3.4 with several OpenVZ-containers. Host and all guests are running Debian 7 x64. Now I want to migrate my old setup to a new server with Proxmox 4 (based on Debian 8). I ...
0
votes
1answer
22 views

Make init script output available without hitting the filesystem

I'm working on an init script for a command which writes extensive activity messages to stdout. The output is only useful for debugging and since it will be running on a Pi, I don't want these ...
0
votes
1answer
164 views

Ceph installs without init scipts. How do I get them?

I have installed ceph in 3 centos7 nodes with ceph-deploy tool. All works good but I haven't any script to manage ceph or radosgw. My /etc/init.d/ folder contains only these: functions, network, ...
-1
votes
2answers
58 views

Centos wont create init.d startup files

recently i installed vnstat on my fresh linux machine. so after installing it with yum install vnstat , before it i installed epel! so now i cant start it: service vnstat start error: unrecognized ...
1
vote
2answers
2k views

Mounting multipath devices by UUID in fstab

I have several multipath iSCSI LUN's formatted as ocfs2 filesystems. They are part of an Ubuntu 14.04 cluster using local heartbeat. This all appears to be working fine if I mount them manually after ...
2
votes
0answers
437 views

init.d script does not work to start hive

I try to start the hive server with an init.d script. If I use the script with: /etc/init.d/hiveserver2 start everything works well. But when I use it with: service hiveserver2 start it will be ...
0
votes
1answer
222 views

Why is a command in init.d script ignored?

As part of my work, I manage a mySQL cluster composed of 3 Ubuntu 14.04 machines. All 3 machines should be identical. On machines 1 and 2, when I run sudo service mysql status, I get a status report ...
1
vote
0answers
23 views

What is the benefit of maintaining tags in System V init files?

This page describes tags that can be put into System V init scripts. http://mcs.une.edu.au/doc/initscripts/sysvinitfiles In RHEL5, chkconfig will parse the chkconfig tag. # chkconfig: 2345 20 80 ...
3
votes
1answer
821 views

Systemd causing multiple supervisor processes

I'm having a problem narrowing down where the issue is for my supervisor configuration that causes a program to be duplicated. I'm running a Python Tornado Web Server through an Nginx reverse proxy. ...