Questions tagged [init.d]

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

352 questions
1
vote
1 answer

linux: determining if a running init.d script is executed as part of the system startup sequence

I am writing a init.d script that should run commands with certain options if it were being executed at system startup. The same script should run commands with other options if the user was manually executing the script. For example, in a…
Sameer Naik
  • 45
  • 1
  • 7
1
vote
1 answer

how to run springboot init.d service as non root user?

This is my springboot service which I created under/etc/init.d. I sudo as springboot user and run service like springboot@xxx~$ sudo service springboot-smsmgmt.service start which starts service as root user. How can I run it as non-root (springboot…
user327126
  • 965
  • 3
  • 11
  • 22
1
vote
2 answers

start-stop-daemon with --background vs running using & option

What is the difference in running a process in background using start-stop-daemon with --background option and using with &?Which option is best and why?
Prasad Roy
  • 117
  • 2
  • 11
1
vote
1 answer

LanguageTool Java app running as a systemd service. `--languagemodel` argument is ignored

I have downloaded the LanguageTool server. I have created a systemd process for the app to ensure that it can be easily managed and begins on startup: Systemd [Unit] Description=LanguageTool…
Muckee
  • 474
  • 1
  • 8
  • 26
1
vote
1 answer

rake task says "define INLINEDIR or HOME in your environment and try again, how do i fix this?

I am running a rake task in rails 2 I have it called from an /etc/init.d/ ruby script. at start up it tells me define INLINEDIR or HOME in your environment and try again It works fine once I Log in, but not if I run unset home first it doesn't…
loosecannon
  • 7,683
  • 3
  • 32
  • 43
1
vote
1 answer

Is it possible to use start init.d service using Ansible?

Ansible will fail the task below - name: Start opendj service: name={{opendj_service_name}} state=started enabled=yes because the service is a init.d service and not systemd Is it possibe to start a init.d service using Ansible?
onknows
  • 6,151
  • 12
  • 65
  • 109
1
vote
4 answers

Why didn't my init.d start-stop-daemon script start the application on boot, but I can start the service manually?

I thought I finally had managed to write my first init.d script properly but when I went to reboot, the launch didn't happen. The script start-foo looks like this: #! /bin/sh # chkconfig 345 85 60 # description: startup script for foo # processname:…
Kit Sunde
  • 35,972
  • 25
  • 125
  • 179
1
vote
0 answers

Is it possible to test init.d script inside docker container

I need test some init.d script to check if it can be executed as expected during system reboot process. Is it possible to use a docker container to test it? In another word, can system reboot process be simulated by restarting a docker container?
kevinlu
  • 1,811
  • 2
  • 14
  • 19
1
vote
2 answers

How do I set up an init.d script for a program?

I have installed a program called node.js on my server to listen on port 8088 My server is a VPS package level 3 from hostgator. Now i m trying to create a init.d script so that node.js runs automatically with system and can restart if crashed…
anjan
  • 3,147
  • 6
  • 26
  • 31
1
vote
3 answers

Executing a native File from init.rc in Android

I want to execute a file from vendor/bin from my init.rc. Below code I have added to my init.rc file on property:sys.vendor.Test_callback=1 exec - system system -- /vendor/bin/testBinary setprop sys.test.hello 62 The property sys.test.hello is…
Aagman
  • 684
  • 6
  • 18
1
vote
1 answer

Automatically run graphical python script on startup in ubuntu

I have a python script that starts a fullscreen animation when run - how do i set this to start at startup in ubuntu 16.04? Other answers to the "script on startup" problem don't work - because I'm assuming they're executed before the desktop…
Robbie Barrat
  • 510
  • 1
  • 6
  • 24
1
vote
0 answers

Looping a functions in init.d

I have an Init.d script that looks like this what I want to do is be able to start both data nodes with one command -all unfortunately my scripts logic will only start one data node. basically my For-loop is only looping through one function. How…
1
vote
2 answers

Restarting a linux app using a respawn entry in inittab does not work

Scenario: I have a process running on linux which is started in the background by a script hooked up at /etc/init.d/ called as MyApp which is just a shell script without the .sh. Following is my init.d script script #!/bin/sh PARAM=$1 case…
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
1
vote
0 answers

Forked init.d process becomes unresponsive

I have a script to start and fork a netcat process. After a while, the netcat process stops logging output. Remote computers are supposed to connect to the socket and send a message every few hours, but it seems like the netcat process dies/halts…
Connor
  • 11
  • 2
1
vote
0 answers

Service starting failed - Failed to start SYSV

My objective is to start a personal daemon called gobatch. gobatch is stored into /usr/sbin/gobatch (during gobatch is just an infinite loop). When I use /etc/init.d/gobatch start I got this error: janv. 08 14:39:03 ubuntu systemd[1]: Failed to…
Royce
  • 1,557
  • 5
  • 19
  • 44