PHPackages                             falc/robo-system-service - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. falc/robo-system-service

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

falc/robo-system-service
========================

Robo tasks related to system service management.

v0.2.0(9y ago)3601MITPHP

Since Oct 9Pushed 9y ago2 watchersCompare

[ Source](https://github.com/Falc/RoboSystemService)[ Packagist](https://packagist.org/packages/falc/robo-system-service)[ RSS](/packages/falc-robo-system-service/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

Robo System Service Tasks
=========================

[](#robo-system-service-tasks)

[![License](https://camo.githubusercontent.com/757212b2b7a7327de1066dc7ea09fd134cdf0bf14927a723d4d328fd60d64d6b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f66616c632f726f626f2d73797374656d2d736572766963652e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://camo.githubusercontent.com/5c204cbfaae8a92c254c57eaa4c972a03c6289b0345b02a7a9854cb7549a3fe6/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f46616c632f526f626f53797374656d536572766963652e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/Falc/RoboSystemService)[![Coverage Status](https://camo.githubusercontent.com/2d25ecbf15a9993d815cf29742583e984d918b650021699714ddf0dfc36158d7/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f46616c632f526f626f53797374656d536572766963652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/Falc/RoboSystemService/)[![Quality Score](https://camo.githubusercontent.com/dc48e100b65df06848cc8d1f0f6f68deee7cace588ffa4dec3c9b3dfbfdc0e4c/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f46616c632f526f626f53797374656d536572766963652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/Falc/RoboSystemService/)

Collection of tasks for interacting with system service managers.

Requirements
------------

[](#requirements)

- [Robo](http://robo.li/) ~0.5 (0.5.0 or higher)

Installation
------------

[](#installation)

Add the `falc/robo-system-service` package to your `composer.json`:

```
composer require falc/robo-system-service

```

Add the `Falc\Robo\Service\loadTasks` trait to your `RoboFile`:

```
class RoboFile extends \Robo\Tasks
{
    use Falc\Robo\Service\loadTasks;

    // ...
}
```

Tasks
-----

[](#tasks)

### Start

[](#start)

Starting a service:

```
$this->taskServiceStart()
    ->serviceManager('systemd')
    ->service('service1')
    ->run();
```

Compact form:

```
$this->taskServiceStart('systemd', 'service1')->run();

```

You can combine it with `taskSshExec()` to start services in a remote server:

```
$startTask = $this->taskServiceStart()
    ->serviceManager('systemd')
    ->service('service1');

$this->taskSshExec('remote.example.com')
    ->remoteDir('/home/user')
    ->printed(false) // Do not display output
    ->exec($startTask)
    ->run();
```

### Stop

[](#stop)

Stopping a service:

```
$this->taskServiceStop()
    ->serviceManager('systemd')
    ->service('service1')
    ->run();
```

Compact form:

```
$this->taskServiceStop('systemd', 'service1')->run();

```

You can combine it with `taskSshExec()` to stop services in a remote server:

```
$stopTask = $this->taskServiceStop()
    ->serviceManager('systemd')
    ->service('service1');

$this->taskSshExec('remote.example.com')
    ->remoteDir('/home/user')
    ->printed(false) // Do not display output
    ->exec($stopTask)
    ->run();
```

### Restart

[](#restart)

Restarting a service:

```
$this->taskServiceRestart()
    ->serviceManager('systemd')
    ->service('service1')
    ->run();
```

Compact form:

```
$this->taskServiceRestart('systemd', 'service1')->run();

```

You can combine it with `taskSshExec()` to restart services in a remote server:

```
$restartTask = $this->taskServiceRestart()
    ->serviceManager('systemd')
    ->service('service1');

$this->taskSshExec('remote.example.com')
    ->remoteDir('/home/user')
    ->printed(false) // Do not display output
    ->exec($restartTask)
    ->run();
```

### Reload

[](#reload)

Reloading a service:

```
$this->taskServiceReload()
    ->serviceManager('systemd')
    ->service('service1')
    ->run();
```

Compact form:

```
$this->taskServiceReload('systemd', 'service1')->run();

```

You can combine it with `taskSshExec()` to reload services in a remote server:

```
$reloadTask = $this->taskServiceReload()
    ->serviceManager('systemd')
    ->service('service1');

$this->taskSshExec('remote.example.com')
    ->remoteDir('/home/user')
    ->printed(false) // Do not display output
    ->exec($reloadTask)
    ->run();
```

### Enable

[](#enable)

Enabling a service:

```
$this->taskServiceEnable()
    ->serviceManager('systemd')
    ->service('service1')
    ->run();
```

Compact form:

```
$this->taskServiceEnable('systemd', 'service1')->run();

```

You can combine it with `taskSshExec()` to enable services in a remote server:

```
$enableTask = $this->taskServiceEnable()
    ->serviceManager('systemd')
    ->service('service1');

$this->taskSshExec('remote.example.com')
    ->remoteDir('/home/user')
    ->printed(false) // Do not display output
    ->exec($enableTask)
    ->run();
```

### Disable

[](#disable)

Disabling a service:

```
$this->taskServiceDisable()
    ->serviceManager('systemd')
    ->service('service1')
    ->run();
```

Compact form:

```
$this->taskServiceDisable('systemd', 'service1')->run();

```

You can combine it with `taskSshExec()` to disable services in a remote server:

```
$disableTask = $this->taskServiceDisable()
    ->serviceManager('systemd')
    ->service('service1');

$this->taskSshExec('remote.example.com')
    ->remoteDir('/home/user')
    ->printed(false) // Do not display output
    ->exec($disableTask)
    ->run();
```

### Daemon reload

[](#daemon-reload)

This task is supported only for systemd.

```
$this->taskServiceDaemonReload()
    ->serviceManager('systemd')
    ->run();
```

Compact form:

```
$this->taskServiceDaemonReload('systemd')->run();

```

You can combine it with `taskSshExec()` to reload systemd manager configuration in a remote server:

```
$daemonReloadTask = $this->taskServiceDaemonReload()
    ->serviceManager('systemd');

$this->taskSshExec('remote.example.com')
    ->remoteDir('/home/user')
    ->printed(false) // Do not display output
    ->exec($daemonReloadTask)
    ->run();
```

Methods
-------

[](#methods)

All the tasks implement these methods:

- `serviceManager($serviceManager)`: Sets the service manager to use.
- `service()`: Sets the service to manage.
- `verbose()`: Enables the verbose mode.

Service managers
----------------

[](#service-managers)

Every task requires to set a service manager either in the constructor or using the `serviceManager($serviceManager)` method.

At the moment these are the supported service managers:

- [systemd](http://www.freedesktop.org/wiki/Software/systemd/)
- [SysVinit](http://savannah.nongnu.org/projects/sysvinit)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

3506d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/be271db0bc92d30320293f761662e84dec7d3ef5ae3f7b037cba1c2f1c2ac8d5?d=identicon)[Falc](/maintainers/Falc)

---

Top Contributors

[![Falc](https://avatars.githubusercontent.com/u/246051?v=4)](https://github.com/Falc "Falc (22 commits)")[![alexndlm](https://avatars.githubusercontent.com/u/6824784?v=4)](https://github.com/alexndlm "alexndlm (4 commits)")

---

Tags

servicesystemrobosystemd

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/falc-robo-system-service/health.svg)

```
[![Health](https://phpackages.com/badges/falc-robo-system-service/health.svg)](https://phpackages.com/packages/falc-robo-system-service)
```

###  Alternatives

[getsolaris/laravel-make-service

A MVCS pattern create a service command for Laravel 5+

81161.3k](/packages/getsolaris-laravel-make-service)[pastuhov/php-exec-command

Simple php command executor with param binding.

25205.4k2](/packages/pastuhov-php-exec-command)[prevailexcel/laravel-action-service-trait

A simple Laravel package to create actions, traits and services using artisan commands

143.0k](/packages/prevailexcel-laravel-action-service-trait)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
