I am trying to migrate an init.d
script from centos 6.6 server to ubuntu 14.04. Centos machine start, status, stop
commands are,
daemon --pidfile=/path/to/pidfile /path/to/daemon/script
status -p /path/to/pidfile /path/to/daemon/script
killproc -p /path/to/pidfile /path/to/daemon/script
start
command works good in its original form on ubuntu 14.04 but the other two functions, status, killproc
are not defined on ubuntu distros.
What is the equivalent of these commands in ubuntu machines?
killproc
issue. Butstatus
on debian is a binary and the Centos cmd -status -p /path/to/pidfile /path/to/daemon/script
doesn't work with debian's/sbin/status/
.man status
took me toinitctl
but it is not very clear, how i can pass thepidfile
argument and get the job status. thanks man. – Jun 06 '15 at 16:57start_daemon
is equivalent todaemon
andpidofproc
is equivalent tostatus
, but I don't have a system to test on. – Mikel Jun 06 '15 at 19:14