Documentation ¶
Index ¶
- Constants
- Variables
- func IsRunning() (bool, error)
- func ListCommand() string
- func ListServices() ([]string, error)
- func Serialize(name string, conf common.Conf) ([]byte, error)
- type Service
- func (s Service) Conf() common.Conf
- func (s *Service) Exists() (bool, error)
- func (s *Service) Install() error
- func (s *Service) InstallCommands() ([]string, error)
- func (s *Service) Installed() (bool, error)
- func (s Service) Name() string
- func (s *Service) Remove() error
- func (s *Service) Restart() error
- func (s *Service) Running() (bool, error)
- func (s *Service) Start() error
- func (s *Service) StartCommands() ([]string, error)
- func (s *Service) Stop() error
- func (s *Service) Validate() error
Constants ¶
const CleanShutdownJob = `` /* 175-byte string literal not displayed */
CleanShutdownJob is added to machines to ensure DHCP-assigned IP addresses are released on shutdown, reboot, or halt. See bug http://pad.lv/1348663 for more info.
const CleanShutdownJobPath = "/etc/init/juju-clean-shutdown.conf"
CleanShutdownJobPath is the full file path where CleanShutdownJob is created.
Variables ¶
var (
InitDir = "/etc/init" // the default init directory name.
)
Functions ¶
func ListCommand ¶
func ListCommand() string
ListCommand returns a command that will list the services on a host.
func ListServices ¶
ListServices returns the name of all installed services on the local host.
Types ¶
type Service ¶
Service provides visibility into and control over an upstart service.
func (*Service) Exists ¶
Exists returns whether the service configuration exists in the init directory with the same content that this Service would have if installed.
func (*Service) InstallCommands ¶
InstallCommands returns shell commands to install the service.
func (*Service) Installed ¶
Installed returns whether the service configuration exists in the init directory.
func (*Service) StartCommands ¶
StartCommands returns shell commands to start the service.