~gnuoy/charm-helpers/bzr-fetch

Viewing all changes in revision 32.

  • Committer: Matthew Wedgwood
  • Date: 2013-06-21 14:22:28 UTC
  • mfrom: (26.1.2 service_control)
  • Revision ID: matthew.wedgwood@canonical.com-20130621142228-5wr0bh9nr9ryw3jq
[james-page] Refactoring of service control code in host helper

1) Use 'service' command for all service control

Detecting upstart and init.d configuration files is overkill; this is
exactly what the 'service' command is design todo and it also deals with
saucy onwards where init.d and upstart configuration with the same
name might be installed.

'service' will always do the right thing

2) Added restart and reload helpers

reload detects an error (say the service is not running) and will fallback
to restart if so.

This is inline with the openstack charm helpers code.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: