Download the PHP package abdulbasset/nssm-php without Composer
On this page you can find all versions of the php package abdulbasset/nssm-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download abdulbasset/nssm-php
More information about abdulbasset/nssm-php
Files in abdulbasset/nssm-php
Package nssm-php
Short Description PHP Wrapper for nssm - the Non-Sucking Service Manager
License MIT
Informations about the package nssm-php
NSSM PHP
A lightweight PHP wrapper for NSSM (the Non-Sucking Service Manager). This package allows you to manage Windows services using PHP by providing a fluent interface to interact with the NSSM binary.
Installation
You can install the package via composer:
Requirements
- PHP 8.3 or higher
- NSSM binary must be available in your system's PATH, or you can specify the path to the binary manually.
Usage
Basic Service Management
Installing and Removing Services
Configuring Service Parameters
You can set various service parameters using the set method. It provides a fluent interface to set multiple parameters at once:
Log Rotation
You can configure log rotation for stdout and stderr files. By default, enabling rotation will rotate files when the service starts or restarts.
Get Service Status
The status() method returns an instance of the Abdulbasset\NssmPhp\Status enum, or null if the status is unknown.
Full Example
Here's a comprehensive example of how to install, configure, and manage a Windows service (Running Octane Server for example):
Custom NSSM Binary Path
If nssm is not in your system's PATH, you can specify its location during instantiation or using the nssm() method:
Testing
The package uses Pest for testing.
License
The MIT License (MIT). Please see License File for more information.