Search by

iqrf / service-manager

Roman3349greav

IQRF PHP service manager

v0.3.0 2026-11-14 15:40 UTC

This package is auto-updated.

Last update: 2026-11-14 15:45:43 UTC


README

Build Status Test coverage Packagist Version Packagist Downloads Apache License API documentation

PHP system service manager with Nette framework integration for our PHP projects.

Requires PHP 8.2 or higher.

Installation

Install the latest version of iqrf/service-manager using Composer.

composer require --dev iqrf/service-manager

Nette Configuration

extensions:
	serviceManager: Iqrf\ServiceManager\DI\ServiceManagerExtension

serviceManager:
	# Init system: 'systemd', 'docker-supervisor', 's6-overlay' or 'unknown'
	initDaemon: 'systemd'
	# s6 scan directory with service directories (only for s6-overlay)
	s6ScanDirectory: '/run/service'

Supported init systems

Operationsystemdsupervisords6-overlay (v3)
start, stop, restartyesyesyes (longrun)
reloadyesyes (SIGHUP)yes (SIGHUP)
exists, isActive, getStatusyesyesyes (longrun)
enable, disable, isEnabledyesnono

getState() returns the systemd unit file state (e.g. static or masked), which allows to detect services that cannot be enabled or disabled.

Exceptions

  • NonexistentServiceException - the service does not exist
  • ServiceOperationException - the operation with an existing service failed (e.g. failed start, enabling a static unit)
  • NotImplementedException - the operation is not supported by the init system
  • UnsupportedInitSystemException - the init system is not supported

License

This project is licensed under Apache License 2.0:

Copyright 2017-2025 IQRF Tech s.r.o.
Copyright 2019-2025 MICRORISC s.r.o.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.