Menu
  • HOME
  • TAGS

Meaning of declarations in /etc/init.d/functions on EL 5

linux,bash,function,init.d

It's just declaring a lot of function scope variables, where killlevel and pid_file are assigned the empty string and the others are not assigned anything. There is a slight difference. local variables are also visible in functions called from the function. So if you happen to call killproc() recursively, the...

Starting multiple tomcat instances in one server with init.d script

centos,tomcat7,multiple-instances,init.d

found a workaround, but expecting better solution using netstat we can find process id via running port number echo `netstat -tlnp | awk '/:80 */ {split($NF,a,"/"); print a[1]}'` So i modified the function tomcat_pid() as below tomcat_pid() { echo `netstat -tlnp | awk '/:<port> */ {split($NF,a,"/"); print a[1]}'` } ...

run solr like daemon

bash,solr,init.d

This isn't working because the daemon function (from /etc/init.d/functions) has changed since 2010 (when the script was posted) and no longer accepts the same arguments. You will need to rewrite the daemon line to accept the currently supported arguments. I had a look at the daemon function on a CentOS...

Python Popen process not working when it is executed from init.d script

python,raspberry-pi,popen,init.d

Popen() returns as soon as the child process is started. It does not wait for it to finish. It is very unlikely that your scripts blocks for long on Popen(). A possible explanation is that your script raises an exception and terminates while trying to start espeak or aplay processes...

CentOS, Node.js, init.d, ENOENT, Can't open or write to log files on system reboot when app started automatically

node.js,init.d,centos7

Init.d script starts the Node script from the node executable's path. You need to specify the script's directory by __dirname to make the paths absolute. logging: { debugToFile: true, debug: path.join(__dirname, 'logs/mediaServerStatus-debug.log'), info: path.join(__dirname, 'logs/mediaServerStatus-info.log'), warn: path.join(__dirname, 'logs/mediaServerStatus-warn.log'), error: path.join(__dirname, 'logs/mediaServerStatus-error.log'), } Be sure to var path = require('path'); before...

/etc/init.d script 'detach' from output

linux,shell,debian,init.d

You can drop it to the background with &, but it's much safer to use the start-stop-daemon which comes with Debian, and has a the --background option to handle this.

Raspberry Pi script boot order

raspberry-pi,crontab,raspbian,init.d,ppp

Script in /etc/init.d Whatever is in /etc/rc.local Your cron daemon command Proof: Scripts in /etc/init.d are ran according to their priority and dependencies (look within the files in /etc/init.d and in the runlevel directories /etc/rc*.d) cat /etc/rc.local get # This script is executed at the end of each multiuser...

How to scp from init.d

scp,init.d

host key verification failed means that your ssh config requires strict host key verification, and that the key of the remote host does not match the one in your known_hosts file. If the init script is run as root, add the host key to /root/.ssh/known_hosts or (less secure) turn off...

What does START=03 mean in /etc/init.d scripts on openwrt?

linux,bash,openwrt,init.d

In this context, START and STOP are used to specify the boot order. Scripts with START=10 will be run after scripts with START=9 but before those with START=11, and scripts with a lower STOP number will be stopped before those with a higher one. More precisely: The variables determine what...

add services to init.d on Ubuntu

mysql,apache,ubuntu,service,init.d

Just put the executable file i.e apachectl in /etc/init.d/ and than try with /etc/init.d/apache{tab} restart/start/stop and all for mysql too it will work. Actually init.d contains the shell script file that is executable. Take care the file should be executable like below chmod +x /etc/init.d/apachectl...