melezhik / service

Manages Linux services
1 stars 1 forks source link
alpine-linux archlinux configuration-management debian fedora linux service sparrowdo ubuntu

SYNOPSIS

Manages Linux services.

The list of supported actions:

Prerequisites

INSTALL

$ sparrow plg install service

USAGE

Manually

$ sparrow plg run service --param service=nginx --param action=enable
$ sparrow plg run service --param service=nginx --param action=start
$ sparrow plg run service --param service=nginx --param action=stop
$ # so on ...

Via Sparrowdo

$ cat sparrowfile

task_run %(
  task => 'enable nginx service',
  plugin => 'service',
  parameters => %( action => 'enable', service => 'nginx' )
);

task_run %(
  task => 'start nginx service',
  plugin => 'service',
  parameters => %( action => 'start', service => 'nginx' )
);

Parameters

service

A service name.

action

One of five: (enable|disable|start|stop|restart). Default value is enable. Should be set.

Platforms supported

Author

Alexey Melezhik