init-service-started

Example:

# Start the 'apache2' service.
- init-service-started:
    name: apache2

Description

Make sure an init service is started.

Variables

Name Type Default Description

name

string --

The name of the service. Required

Examples

Example 1

Start the 'apache2' service.

Code
- init-service-started:
    name: apache2
Description

This doesn't enable the 'apache2' service if it isn't already.

Code

doc:
  short_help: Start init-service.
  help: |
    Make sure an init service is started.
  examples:
  - title: Start the 'apache2' service.
    desc: |
      This doesn't enable the 'apache2' service if it isn't already.
    vars:
      name: apache2

args:
  name:
    doc:
      short_help: The name of the service.
    type: string
    required: true
    cli:
      metavar: SERVICE_NAME
      param_type: argument

meta:
  tags:
  - init
  - systemd
  - service

frecklets:
- init-service-configured:
    started: true
    name: '{{:: name ::}}'
frecklecute init-service-started --help

Usage: frecklecute init-service-started [OPTIONS] SERVICE_NAME

  Make sure an init service is started.

Options:
  --help  Show this message and exit.
# -*- coding: utf-8 -*-


#
# module path: pycklets.init_service_started.InitServiceStarted
#


from dataclasses import dataclass
from pyckles import AutoPycklet
from typing import *    # noqa

@dataclass
class InitServiceStarted(AutoPycklet):
    """Make sure an init service is started.

       Args:
         name: The name of the service.

    """

    FRECKLET_ID = "init-service-started"

    name: str = None


    def __post_init__(self):
        super(InitServiceStarted, self).__init__(var_names=["name"])


frecklet_class = InitServiceStarted
# -*- coding: utf-8 -*-


#
# module path: pycklets.init_service_started.InitServiceStarted
#


from pyckles import AutoPycklet

class InitServiceStarted(AutoPycklet):
    """Make sure an init service is started.

       Args:
         name: The name of the service.

    """

    FRECKLET_ID = "init-service-started"

    def __init__(self, name=None):

        super(InitServiceStarted, self).__init__(var_names=["name"])
        self._name = name

    @property
    def name(self):
        return self._name

    @name.setter
    def name(self, name):
        self._name = name



frecklet_class = InitServiceStarted