Questions tagged [init-script]

13 questions
19
votes
1 answer

Systemd error : Executable path is not absolute

I have the following below code of systemd. [Unit] Description=start RCC logger server process Requires=rcc-drbd.service rcc_check_locked_scr.service s96rcc.service After=rcc-drbd.service rcc_check_locked_scr.service…
6
votes
2 answers

Bash script to wait for Virtualbox VM shutdown?

Virtualbox has the ability to issue a command to a running vm: vboxmanage controlvm NameOfRunningVM acpipowerbutton However this command returns immediately which results in non-graceful shutdown for my situation. The situation: I plan on using…
3
votes
1 answer

Upstart: chdir stanza VS cd command

In Upstart script I can use chdir stanza to set the working directory. Also I can just execute a normal cd command inside my script section. What is the difference between this two approaches? When and why I should use each of them?
vbo
  • 131
3
votes
3 answers

Why would a shutdown script NOT run?

I have installed a shutdown script on an Ubuntu system which doesn't get executed. It is an Amazon EC2 instance. I'm not sure it has to do with this fact just wanted to point it out. The script should push some log files to an Amazon S3 bucket so it…
marekful
  • 173
2
votes
1 answer

Tell if a process is under systemd, init.d or Upstart control

Is it possible to reliable tell for a given Linux process if it was launched or is still supervised by an init.d script, Upstart or systemd ?
dronus
  • 1,978
2
votes
1 answer

s3cmd fails to run from an init-script

I created an init-script that should push some log files using s3cmd to an Amazon S3 bucket when the system is going down. s3cmd is installed and s3cmd --configure was run as user root and the configuration is OK When manually executing the init…
marekful
  • 173
1
vote
0 answers

How to create additional start up script for one service

I installed the package 'gearman-job-server' in Ubuntu server. it creates start up script by default as /etc/init/gearman-job-server.conf. But I want to add more command to same service. So created my custom start script as /etc/init/gearmand.conf,…
Gowri
  • 177
1
vote
2 answers

How can I create a /etc/init.d/ script easily?

I usually just copy some existing script like /etc/init.d/ssh, remove extra things and edit remaining things. This is not very convenient. Is there a simple tool to create good Debian initscripts? Expecting something like this: r@l:~#…
Vi.
  • 17,755
1
vote
1 answer

Stop script in init.d is not called

I am using Centos distro. I have a stop script present in etc folder appended with K** prefix [linux_machine ~]$ ll /etc/rc0.d/ total 0 lrwxrwxrwx 1 root root 31 Apr 5 00:59 K01kill-agents -> /etc/init.d/kill-agents Also have symlink created…
0
votes
0 answers

LSB Init script not executed

I've created an LSB compatible init script which I intend to use to push some log files to an Amazon S3 bucket when the system is going down but it doesn't get executed. Here is the script contents in in file /etc/init.d/push-apache-logs-to-s3.sh (I…
marekful
  • 173
0
votes
1 answer

How to get "su" to work in init scripts in Red Hat 8 with SELinux?

In an init script I'm trying to run a command: su - user -c "/home/user/bin/command” but SELinux prevents this: systemd[1]: Starting LSB: Start the my_script at boot... su[5941]: pam_unix(su-l:auth): auth could not identify password for…
Mareq
  • 101
  • 3
0
votes
1 answer

systemd service failed to start with errror : "main process exited, code=exited, status=3/NOTIMPLEMENTED"

I am getting below error when i start a systemd service [localhost.localdomain]-> systemctl status rcc_rccproxy.service * rcc_rccproxy.service - starts RCC Proxy process Loaded: loaded (/etc/systemd/system/rcc_rccproxy.service; enabled; vendor…
0
votes
1 answer

Does systemd honour KILL order from chkconfig

Title of the question is just what I needed to ask. I don't see it actually following that. Is there a way, in which I can make systemd follow the KILL order. From what I see, it just reverses the start order while killing/stopping processes.