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
1answer
581 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 ...
0
votes
1answer
98 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-...
0
votes
1answer
44 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 ...
0
votes
0answers
63 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), ...
0
votes
1answer
66 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 ...
0
votes
0answers
64 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/...
0
votes
0answers
240 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 ...
0
votes
1answer
34 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 ...
1
vote
1answer
89 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 ...
2
votes
1answer
5k 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 ...
1
vote
1answer
5k 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 ...
0
votes
0answers
480 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-...
2
votes
0answers
404 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 ...
0
votes
1answer
2k 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: ...
0
votes
1answer
148 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
127 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
5k 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
1answer
342 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: ...
4
votes
1answer
5k 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 ...
4
votes
0answers
2k 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
123 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
622 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
4k 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
528 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. ...
4
votes
1answer
483 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 ...
2
votes
2answers
6k 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
612 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. ...
3
votes
0answers
2k 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-...
1
vote
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 ...
1
vote
0answers
356 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 ...
1
vote
2answers
1k 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
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 ...
0
votes
1answer
602 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/...
2
votes
1answer
2k 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
25 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
447 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
5k 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
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 ...
6
votes
2answers
6k 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 = ...
6
votes
2answers
16k 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-...
57
votes
6answers
79k 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
7k 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
52 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
1k 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 (...
2
votes
0answers
1k 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
448 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
177 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
834 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
535 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
628 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
2 3 4 5 6