2017 © Pedro Peláez
 

library systemctl

Library for managing systemd services using systemctl

image

mjanser/systemctl

Library for managing systemd services using systemctl

  • Sunday, February 11, 2018
  • by mjanser
  • Repository
  • 1 Watchers
  • 6 Stars
  • 119 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 9 % Grown

The README.md

SystemCtl for PHP

Build Status Code Coverage, (*1)

This library can be used to manage systemd services. Internally it uses the Symfony Process Component for running the systemctl command., (*2)

Requirements

  • PHP 7.0 or higher
  • systemd installed

Installation

Run the following composer command in your project:, (*3)

composer require mjanser/systemctl

Usage

Example usage:, (*4)

$service = new SystemCtl\Service('my-service');

if ($service->isRunning()) {
    $service->stop();
} else {
    $service->start();
}

$service->restart();

By default the command systemctl will be executed with sudo. You can change that if you need., (*5)

SystemCtl\Service::setCommand('my-systemctl');
SystemCtl\Service::sudo(false);

The Versions

11/02 2018

dev-master

9999999-dev https://github.com/mjanser/php-systemctl

Library for managing systemd services using systemctl

  Sources   Download

GPLv3 GPL-3.0-or-later

The Requires

 

The Development Requires

by Martin Janser

systemd

30/03 2017

dev-update-vendors

dev-update-vendors https://github.com/mjanser/php-systemctl

Library for managing systemd services using systemctl

  Sources   Download

GPLv3

The Requires

 

The Development Requires

by Martin Janser

systemd