ControlTier > controltier-elements
 

SystemService

Unix/Linux system service module

Overview

Open in Workbench SystemService: Unix/Linux system service module

SystemService uses the /etc/init.d/ scripts to manage services, optionally via sudo.

Design

Super Type
Service
Role Concrete. (Objects can be created.)
Instance Names Unique
Notification false
Template Directory
Data View Children, proximity: 1
Logger Name SystemService

Constraints

Allowed Child Dependencies

1: These types have a Singleton constraint. Only one instance may be added as a resource.

Allowed Parent Dependencies

  • Node
  • Site

Attributes

Defaults for Imported Attributes

Name Default
systemServiceUseSudo true

Commands

Note
Commandline options displayed in square brackets "[]" are optional. If an option expects arguments, then angle brackets are shown after the option "<>". Any default value is shown within the brackets.

assertServiceIsDown

Check whether the specified system service is down

Usage
assertServiceIsDown [-script <>] [-usesudo <>]

Options

Option Description
script System service script
usesudo Whether or not to use sudo

assertServiceIsUp

Check whether the specified system service is up

Usage
assertServiceIsUp [-script <>] [-usesudo <>]

Options

Option Description
script System service script
usesudo Whether or not to use sudo

startService

Start the specified system service

Usage
startService [-script <>] [-usesudo <>]

Options

Option Description
script System service script
usesudo Whether or not to use sudo

stopService

Stop the specified system service

Usage
stopService [-script <>] [-usesudo <>]

Options

Option Description
script System service script
usesudo Whether or not to use sudo

Related Types

The following types are defined for use with SystemService.

SystemServiceSetting

Overview

Open in Workbench SystemServiceSetting: An System Service setting.

Design

Super Type
Setting
Role Abstract. (Objects cannot be created.)
Instance Names Unique

Constraints

Allowed Parent Dependencies

SystemServiceScript

Overview

Open in Workbench SystemServiceScript: The name of the system service script in /etc/init.d

This must be set in order to use this module directly. You can also set an attribute-default for systemServiceScript in your subtype.

Design

Super Type
SystemServiceSetting
Role Concrete. (Objects can be created.)
Instance Names Unique

Attributes

Exported Attributes
Name Property
systemServiceScript settingValue

SystemServiceUseSudo

Overview

Open in Workbench SystemServiceUseSudo: Indicate whether sudo should be used to run the commands necessary to manage system services

Defaults to true.

Design

Super Type
SystemServiceSetting
Role Concrete. (Objects can be created.)
Instance Names Unique

Attributes

Exported Attributes
Name Property
systemServiceUseSudo settingValue