systemd-service-config

Description

Configuration file for environment variables to configure a systemd service.

Variables

Name Type Default Description

env_vars

dict --

n/a Required

service_name

string --

The name of the service. Required

Code

doc:
  short_help: Configuration file for environment variables to configure a systemd
    service.

args:
  _import: systemd-service-config-file
  service_name:
    doc:
      short_help: The name of the service.
    type: string
    required: true

frecklets:
- systemd-service-config-file:
    env_vars: '{{:: env_vars ::}}'
    path: '/etc/conf.d/{{:: service_name ::}}'
    owner: root
    group: root
    mode: '0600'
frecklecute systemd-service-config --help

Usage: frecklecute systemd-service-config [OPTIONS]

  Configuration file for environment variables to configure a systemd
  service.

Options:
  --env-vars ENV_VARS          n/a  [required]
  --service-name SERVICE_NAME  The name of the service.  [required]
  --help                       Show this message and exit.
# -*- coding: utf-8 -*-


#
# module path: pycklets.systemd_service_config.SystemdServiceConfig
#


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

@dataclass
class SystemdServiceConfig(AutoPycklet):
    """Configuration file for environment variables to configure a systemd service.

       Args:
         env_vars: n/a
         service_name: The name of the service.

    """

    FRECKLET_ID = "systemd-service-config"

    env_vars: Dict = None
    service_name: str = None


    def __post_init__(self):
        super(SystemdServiceConfig, self).__init__(var_names=["env_vars", "service_name"])


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


#
# module path: pycklets.systemd_service_config.SystemdServiceConfig
#


from pyckles import AutoPycklet

class SystemdServiceConfig(AutoPycklet):
    """Configuration file for environment variables to configure a systemd service.

       Args:
         env_vars: n/a
         service_name: The name of the service.

    """

    FRECKLET_ID = "systemd-service-config"

    def __init__(self, env_vars=None, service_name=None):

        super(SystemdServiceConfig, self).__init__(var_names=["env_vars", "service_name"])
        self._env_vars = env_vars
        self._service_name = service_name

    @property
    def env_vars(self):
        return self._env_vars

    @env_vars.setter
    def env_vars(self, env_vars):
        self._env_vars = env_vars

    @property
    def service_name(self):
        return self._service_name

    @service_name.setter
    def service_name(self, service_name):
        self._service_name = service_name



frecklet_class = SystemdServiceConfig