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.

291 questions
3
votes
3 answers

Redhat init script best practice

I want to write an init service script which runs the program as a particular user (and not root). I will then chkconfig this script and install into my production run level. I could just put a su command in the script but I was wondering if there…
Garry Harthill
  • 864
  • 1
  • 11
  • 17
3
votes
2 answers

/etc/rc.local not being run on Ubuntu Desktop Install

I have been trying to get sphinx to run at boot, so I added some lines to /etc/rc.local but nothing happens when I start up. If i run it manually it works however. /etc/init.d/rc.local start works fine as does /etc/rc.local It's listed in the…
loosecannon
  • 131
  • 1
  • 4
3
votes
4 answers

init.d script not starting on startup

I have what I consider to be a pretty simple script that I want to run on startup, however I'm pretty new to init.d scripts, and maybe there is a better way to do this in general. Basically I want my script to run when the system starts, so I have a…
JP Silvashy
  • 1,447
  • 6
  • 24
  • 30
3
votes
3 answers

Comprehensive guide to init.d scripts?

I'm looking for good resources to learn more about how to write/debug/maintain init.d scripts on Ubuntu. Do you have any links or books to recommend ?
Thibaut Barrère
  • 691
  • 1
  • 9
  • 17
3
votes
1 answer

Problem with startup script

I am trying to get Chandler running on a debian box on startup under user 'chandler', and have tried the following script, locating it in init.d: #! /bin/sh # # /etc/init.d/chandler # RETVAL=$? CHANDLER_HOME="/chandler" # check input case "$1" in …
Unpossible
  • 143
  • 1
  • 9
3
votes
1 answer

Script in /etc/init.d won't run on startup (Ubuntu 8.10)

I'm on Ubuntu 8.10 The script runs when called from the command line with sudo /etc/init.d/xbindkeys start. Here's how it looks: #! /bin/sh PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin case "$1" in start) xbindkeys ;; …
ehsanul
  • 427
  • 1
  • 8
  • 19
3
votes
3 answers

Have a service start on startup with Ubuntu

I'm not clear on how to start a service when the server boots, I read on some of the other questions asked about adding the script to /etc/init.d, but It's just one line that I need to execute in the commandline: sudo /etc/init.d/avahi-daemon…
JP Silvashy
  • 1,447
  • 6
  • 24
  • 30
3
votes
1 answer

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 detail that the information is useless. I'm trying…
noket
  • 31
  • 1
  • 1
  • 2
2
votes
1 answer

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 processes. It is available as /sbin/init and…
Jonathan
  • 1,309
  • 2
  • 22
  • 29
2
votes
0 answers

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 1024 and 4096 respectively. This latter nuance is…
Hassan Baig
  • 2,325
  • 12
  • 29
  • 48
2
votes
1 answer

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 function that checks the status code and calls…
Jamie
  • 1,284
  • 7
  • 22
  • 40
2
votes
2 answers

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: $local_fs $network $named $time $syslog #…
2
votes
2 answers

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 (rotor-app-01.dev is the Tomcat host.…
dev.brutus
  • 211
  • 3
  • 7
2
votes
0 answers

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.html). Unfortunately, there isn't too much…
R Law
  • 21
  • 2
2
votes
2 answers

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 transferred multiple OpenVZ-containers to the new…
Marius
  • 141
  • 10