Service management in ubuntu like chkconfig: Difference between revisions
Jump to navigation
Jump to search
(Created page with "I'm puzzled that there isn't a direct correlary for chkconfig in the debian world. Taking apart the init script for mythtv, I see that their current state of the art is this: …") |
No edit summary |
||
Line 14: | Line 14: | ||
<h3>get current status of a daemon</h3> | <h3>get current status of a daemon</h3> | ||
root@potato:/etc/init.d# initctl status mythtv-backend | root@potato:/etc/init.d# initctl status mythtv-backend | ||
mythtv-backend stop/waiting | mythtv-backend stop/waiting | ||
But where does initctl keep its brains? Each job is configured in /etc/init/*conf like this: | But where does initctl keep its brains? Each job is configured in /etc/init/*conf like this: |
Latest revision as of 00:27, 14 June 2012
I'm puzzled that there isn't a direct correlary for chkconfig in the debian world.
Taking apart the init script for mythtv, I see that their current state of the art is this:
initctl show-config -e "$JOB"
Which produces output on a sample daemon like this:
root@potato:/etc/init.d# initctl show-config -e idmapd idmapd start on local-filesystems (job:, env:) start on mounting (job:, env: TYPE=nfs4) stop on runlevel (job:, env: [06])
get current status of a daemon
root@potato:/etc/init.d# initctl status mythtv-backend mythtv-backend stop/waiting
But where does initctl keep its brains? Each job is configured in /etc/init/*conf like this:
# MythTV Backend service description "MythTV Backend" author "Mario Limonciello <superm1@ubuntu.com>" #start on (local-filesystems and net-device-up IFACE=lo and started udev-finish) stop on starting shutdown #expect fork respawn exec /usr/bin/mythbackend --logfile /var/log/mythtv/mythbackend.log --user mythtv
So if I want to activate this job, I can uncomment the "start on" and then reload the job configuration like so
root@potato:/etc/init# initctl reload-configuration