Bearsampp 2026.7.11
Loading...
Searching...
No Matches
Nssm Class Reference

Public Member Functions

 __construct ($name)
 create ()
 delete ()
 getBinPath ()
 getDisplayName ()
 getEnvironmentExtra ()
 getError ()
 getLatestError ()
 getLatestStatus ()
 getName ()
 getParams ()
 getStart ()
 getStderr ()
 getStdout ()
 infos ()
 isInstalled ()
 isPaused ()
 isPending ($status)
 isRunning ()
 isStopped ()
 restart ()
 setBinPath ($binPath)
 setDisplayName ($displayName)
 setEnvironmentExtra ($environmentExtra)
 setName ($name)
 setParams ($params)
 setStart ($start)
 setStderr ($stderr)
 setStdout ($stdout)
 start ()
 status ($timeout=true)
 stop ()

Data Fields

const INFO_APP_DIRECTORY = 'AppDirectory'
const INFO_APP_ENVIRONMENT_EXTRA = 'AppEnvironmentExtra'
const INFO_APP_PARAMETERS = 'AppParameters'
const INFO_APP_STDERR = 'AppStderr'
const INFO_APP_STDOUT = 'AppStdout'
const INFO_APPLICATION = 'Application'
const PENDING_TIMEOUT = 10
const SERVICE_AUTO_START = 'SERVICE_AUTO_START'
const SERVICE_DELAYED_START = 'SERVICE_DELAYED_START'
const SERVICE_DEMAND_START = 'SERVICE_DEMAND_START'
const SERVICE_DISABLED = 'SERVICE_DISABLED'
const SERVICE_INTERACTIVE_PROCESS = 'SERVICE_INTERACTIVE_PROCESS'
const SERVICE_WIN32_OWN_PROCESS = 'SERVICE_WIN32_OWN_PROCESS'
const SLEEP_TIME = 100000
const STATUS_CONTINUE_PENDING = 'SERVICE_CONTINUE_PENDING'
const STATUS_NA = '-1'
const STATUS_NOT_EXIST = 'SERVICE_NOT_EXIST'
const STATUS_PAUSE_PENDING = 'SERVICE_PAUSE_PENDING'
const STATUS_PAUSED = 'SERVICE_PAUSED'
const STATUS_RUNNING = 'SERVICE_RUNNING'
const STATUS_START_PENDING = 'SERVICE_START_PENDING'
const STATUS_STOP_PENDING = 'SERVICE_STOP_PENDING'
const STATUS_STOPPED = 'SERVICE_STOPPED'

Private Member Functions

 exec ($args)
 getServiceStatusDesc ($status)
 writeLog ($log)
 writeLogError ($log)
 writeLogInfo ($log)

Private Attributes

 $binPath
 $displayName
 $environmentExtra
 $latestError
 $latestStatus
 $name
 $params
 $start
 $stderr
 $stdout

Detailed Description

Class Nssm

This class provides methods to manage Windows services using NSSM (Non-Sucking Service Manager). It includes functionalities to create, delete, start, stop, and retrieve the status of services. The class also logs operations and errors.

Definition at line 17 of file class.nssm.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( $name)

Nssm constructor. Initializes the Nssm class and logs the initialization.

Parameters
string$nameThe name of the service.

Definition at line 68 of file class.nssm.php.

69 {
70 Log::initClass( $this );
71 $this->name = $name;
72 }
static initClass($classInstance)

References $name, and Log\initClass().

Here is the call graph for this function:

Member Function Documentation

◆ create()

create ( )

Creates a new service.

Returns
bool True if the service was created successfully, false otherwise.

Definition at line 186 of file class.nssm.php.

187 {
188 $this->writeLog( 'Create service' );
189 $this->writeLog( '-> service: ' . $this->getName() );
190 $this->writeLog( '-> display: ' . $this->getDisplayName() );
191 $this->writeLog( '-> description: ' . $this->getDisplayName() );
192 $this->writeLog( '-> path: ' . $this->getBinPath() );
193 $this->writeLog( '-> params: ' . $this->getParams() );
194 $this->writeLog( '-> stdout: ' . $this->getStdout() );
195 $this->writeLog( '-> stderr: ' . $this->getStderr() );
196 $this->writeLog( '-> environment extra: ' . $this->getEnvironmentExtra() );
197 $this->writeLog( '-> start_type: ' . ($this->getStart() != null ? $this->getStart() : self::SERVICE_DEMAND_START) );
198
199 // Install bin
200 $exec = $this->exec( 'install ' . $this->getName() . ' "' . $this->getBinPath() . '"' );
201 if ( $exec === false ) {
202 return false;
203 }
204
205 // Params
206 $exec = $this->exec( 'set ' . $this->getName() . ' AppParameters "' . $this->getParams() . '"' );
207 if ( $exec === false ) {
208 return false;
209 }
210
211 // DisplayName
212 $exec = $this->exec( 'set ' . $this->getName() . ' DisplayName "' . $this->getDisplayName() . '"' );
213 if ( $exec === false ) {
214 return false;
215 }
216
217 // Description
218 $exec = $this->exec( 'set ' . $this->getName() . ' Description "' . $this->getDisplayName() . '"' );
219 if ( $exec === false ) {
220 return false;
221 }
222
223 // No AppNoConsole to fix nssm problems with Windows 10 Creators update.
224 $exec = $this->exec( 'set ' . $this->getName() . ' AppNoConsole "1"' );
225 if ( $exec === false ) {
226 return false;
227 }
228
229 // Start
230 $exec = $this->exec( 'set ' . $this->getName() . ' Start "' . ($this->getStart() != null ? $this->getStart() : self::SERVICE_DEMAND_START) . '"' );
231 if ( $exec === false ) {
232 return false;
233 }
234
235 // Stdout
236 $exec = $this->exec( 'set ' . $this->getName() . ' AppStdout "' . $this->getStdout() . '"' );
237 if ( $exec === false ) {
238 return false;
239 }
240
241 // Stderr
242 $exec = $this->exec( 'set ' . $this->getName() . ' AppStderr "' . $this->getStderr() . '"' );
243 if ( $exec === false ) {
244 return false;
245 }
246
247 // Environment Extra
248 $exec = $this->exec( 'set ' . $this->getName() . ' AppEnvironmentExtra ' . $this->getEnvironmentExtra() );
249 if ( $exec === false ) {
250 return false;
251 }
252
253 if ( !$this->isInstalled() ) {
254 $this->latestError = null;
255
256 return false;
257 }
258
259 return true;
260 }
getDisplayName()
writeLog($log)
getStdout()
getName()
exec($args)
getStderr()
getStart()
getEnvironmentExtra()
getBinPath()
getParams()
isInstalled()

References exec(), getBinPath(), getDisplayName(), getEnvironmentExtra(), getName(), getParams(), getStart(), getStderr(), getStdout(), isInstalled(), and writeLog().

Here is the call graph for this function:

◆ delete()

delete ( )

Deletes the service.

Returns
bool True if the service was deleted successfully, false otherwise.

Definition at line 267 of file class.nssm.php.

268 {
269 $this->stop();
270
271 $this->writeLog( 'Delete service ' . $this->getName() );
272 $exec = $this->exec( 'remove ' . $this->getName() . ' confirm' );
273 if ( $exec === false ) {
274 return false;
275 }
276
277 if ( $this->isInstalled() ) {
278 $this->latestError = null;
279
280 return false;
281 }
282
283 return true;
284 }

References exec(), getName(), isInstalled(), stop(), and writeLog().

Here is the call graph for this function:

◆ exec()

exec ( $args)
private

Executes an NSSM command.

Parameters
string$argsThe arguments for the NSSM command.
Returns
array|false The result of the execution, or false on failure.

Definition at line 114 of file class.nssm.php.

115 {
116 global $bearsamppCore;
117
118 $command = '"' . Path::getNssmExe() . '" ' . $args;
119 $this->writeLogInfo( 'Cmd: ' . $command );
120
121 $result = Batch::exec( 'nssm', $command, 10 );
122 if ( is_array( $result ) ) {
123 $rebuildResult = array();
124 foreach ( $result as $row ) {
125 $row = trim( $row );
126 if ( !empty( $row ) ) {
127 $rebuildResult[] = preg_replace( '/[\x00-\x1F\x80-\xFF]/', '', $row );
128 }
129 }
130 $result = $rebuildResult;
131 if ( count( $result ) > 1 ) {
132 $this->latestError = implode( ' ; ', $result );
133 }
134
135 return $result;
136 }
137
138 return false;
139 }
$result
global $bearsamppCore
static exec($basename, $content, $timeout=true, $catchOutput=true, $standalone=false, $silent=true, $rebuild=true)
writeLogInfo($log)
static getNssmExe($aetrayPath=false)

References $bearsamppCore, $result, Batch\exec(), Path\getNssmExe(), and writeLogInfo().

Referenced by create(), delete(), start(), status(), and stop().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getBinPath()

getBinPath ( )

Gets the binary path of the service.

Returns
string The binary path of the service.

Definition at line 541 of file class.nssm.php.

542 {
543 return $this->binPath;
544 }

References $binPath.

Referenced by create().

Here is the caller graph for this function:

◆ getDisplayName()

getDisplayName ( )

Gets the display name of the service.

Returns
string The display name of the service.

Definition at line 521 of file class.nssm.php.

522 {
523 return $this->displayName;
524 }
$displayName

References $displayName.

Referenced by create().

Here is the caller graph for this function:

◆ getEnvironmentExtra()

getEnvironmentExtra ( )

Gets the additional environment variables for the service.

Returns
string The additional environment variables.

Definition at line 641 of file class.nssm.php.

642 {
644 }
$environmentExtra

References $environmentExtra.

Referenced by create().

Here is the caller graph for this function:

◆ getError()

getError ( )

Retrieves the error message or status description of the service.

Returns
string|null The error message or status description, or null if no error or status is available.

Definition at line 681 of file class.nssm.php.

682 {
683 global $bearsamppLang;
684
685 if ( !empty( $this->latestError ) ) {
686 return $bearsamppLang->getValue( Lang::ERROR ) . ' ' . $this->latestError;
687 }
688 elseif ( $this->latestStatus != self::STATUS_NA ) {
689 return $bearsamppLang->getValue( Lang::STATUS ) . ' ' . $this->latestStatus . ' : ' . $this->getWin32ServiceStatusDesc( $this->latestStatus );
690 }
691
692 return null;
693 }
global $bearsamppLang
const ERROR
const STATUS
$latestError

References $bearsamppLang, $latestError, Lang\ERROR, and Lang\STATUS.

◆ getLatestError()

getLatestError ( )

Gets the latest error message related to the service.

Returns
string The latest error message.

Definition at line 671 of file class.nssm.php.

672 {
673 return $this->latestError;
674 }

References $latestError.

◆ getLatestStatus()

getLatestStatus ( )

Gets the latest status of the service.

Returns
string The latest status of the service.

Definition at line 661 of file class.nssm.php.

662 {
663 return $this->latestStatus;
664 }
$latestStatus

References $latestStatus.

◆ getName()

getName ( )

Gets the name of the service.

Returns
string The name of the service.

Definition at line 501 of file class.nssm.php.

502 {
503 return $this->name;
504 }

References $name.

Referenced by create(), delete(), infos(), isInstalled(), isPaused(), isRunning(), isStopped(), start(), status(), and stop().

Here is the caller graph for this function:

◆ getParams()

getParams ( )

Gets the parameters of the service.

Returns
string The parameters of the service.

Definition at line 561 of file class.nssm.php.

562 {
563 return $this->params;
564 }

References $params.

Referenced by create().

Here is the caller graph for this function:

◆ getServiceStatusDesc()

getServiceStatusDesc ( $status)
private

Retrieves the description of the service status.

Parameters
string$statusThe status to describe.
Returns
string|null The description of the status, or null if not recognized.

Definition at line 464 of file class.nssm.php.

465 {
466 switch ( $status ) {
467 case self::STATUS_CONTINUE_PENDING:
468 return 'The service continue is pending.';
469
470 case self::STATUS_PAUSE_PENDING:
471 return 'The service pause is pending.';
472
473 case self::STATUS_PAUSED:
474 return 'The service is paused.';
475
476 case self::STATUS_RUNNING:
477 return 'The service is running.';
478
479 case self::STATUS_START_PENDING:
480 return 'The service is starting.';
481
482 case self::STATUS_STOP_PENDING:
483 return 'The service is stopping.';
484
485 case self::STATUS_STOPPED:
486 return 'The service is not running.';
487
488 case self::STATUS_NA:
489 return 'Cannot retrieve service status.';
490
491 default:
492 return null;
493 }
494 }

◆ getStart()

getStart ( )

Gets the start type of the service.

Returns
string The start type of the service.

Definition at line 581 of file class.nssm.php.

582 {
583 return $this->start;
584 }

References $start.

Referenced by create().

Here is the caller graph for this function:

◆ getStderr()

getStderr ( )

Gets the stderr path of the service.

Returns
string The stderr path of the service.

Definition at line 621 of file class.nssm.php.

622 {
623 return $this->stderr;
624 }

References $stderr.

Referenced by create().

Here is the caller graph for this function:

◆ getStdout()

getStdout ( )

Gets the stdout path of the service.

Returns
string The stdout path of the service.

Definition at line 601 of file class.nssm.php.

602 {
603 return $this->stdout;
604 }

References $stdout.

Referenced by create().

Here is the caller graph for this function:

◆ infos()

infos ( )

Retrieves information about the service.

Returns
array|false The service information, or false on failure.

Definition at line 351 of file class.nssm.php.

352 {
353 global $bearsamppRegistry;
354
355 $infos = Win32Native::getServiceInfo( $this->getName() );
356 if ( $infos === false ) {
357 return false;
358 }
359
360 $infosNssm = array();
361 $infosKeys = array(
362 self::INFO_APPLICATION,
363 self::INFO_APP_PARAMETERS,
364 );
365
366 foreach ( $infosKeys as $infoKey ) {
367 $value = null;
368 $exists = $bearsamppRegistry->exists(
370 'SYSTEM\CurrentControlSet\Services\\' . $this->getName() . '\Parameters',
371 $infoKey
372 );
373 if ( $exists ) {
374 $value = $bearsamppRegistry->getValue(
376 'SYSTEM\CurrentControlSet\Services\\' . $this->getName() . '\Parameters',
377 $infoKey
378 );
379 }
380 $infosNssm[$infoKey] = $value;
381 }
382
383 if ( !isset( $infosNssm[self::INFO_APPLICATION] ) ) {
384 return $infos;
385 }
386
387 $infos[Win32Service::VBS_PATH_NAME] = $infosNssm[Nssm::INFO_APPLICATION] . ' ' . $infosNssm[Nssm::INFO_APP_PARAMETERS];
388
389 return $infos;
390 }
const INFO_APP_PARAMETERS
const INFO_APPLICATION
const HKEY_LOCAL_MACHINE
static getServiceInfo($serviceName, $properties=[])

References getName(), Win32Native\getServiceInfo(), Registry\HKEY_LOCAL_MACHINE, INFO_APP_PARAMETERS, INFO_APPLICATION, and Win32Service\VBS_PATH_NAME.

Here is the call graph for this function:

◆ isInstalled()

isInstalled ( )

Checks if the service is installed.

Returns
bool True if the service is installed, false otherwise.

Definition at line 397 of file class.nssm.php.

398 {
399 $status = $this->status();
400 $this->writeLog( 'isInstalled ' . $this->getName() . ': ' . ($status != self::STATUS_NA ? 'YES' : 'NO') . ' (status: ' . $status . ')' );
401
402 return $status != self::STATUS_NA;
403 }
status($timeout=true)

References getName(), status(), and writeLog().

Referenced by create(), and delete().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isPaused()

isPaused ( )

Checks if the service is paused.

Returns
bool True if the service is paused, false otherwise.

Definition at line 436 of file class.nssm.php.

437 {
438 $status = $this->status();
439 $this->writeLog( 'isPaused ' . $this->getName() . ': ' . ($status == self::STATUS_PAUSED ? 'YES' : 'NO') . ' (status: ' . $status . ')' );
440
441 return $status == self::STATUS_PAUSED;
442 }

References getName(), status(), and writeLog().

Here is the call graph for this function:

◆ isPending()

isPending ( $status)

Checks if the service status is pending.

Parameters
string$statusThe status to check.
Returns
bool True if the status is pending, false otherwise.

Definition at line 451 of file class.nssm.php.

452 {
453 return $status == self::STATUS_START_PENDING || $status == self::STATUS_STOP_PENDING
454 || $status == self::STATUS_CONTINUE_PENDING || $status == self::STATUS_PAUSE_PENDING;
455 }

Referenced by status().

Here is the caller graph for this function:

◆ isRunning()

isRunning ( )

Checks if the service is running.

Returns
bool True if the service is running, false otherwise.

Definition at line 410 of file class.nssm.php.

411 {
412 $status = $this->status();
413 $this->writeLog( 'isRunning ' . $this->getName() . ': ' . ($status == self::STATUS_RUNNING ? 'YES' : 'NO') . ' (status: ' . $status . ')' );
414
415 return $status == self::STATUS_RUNNING;
416 }

References getName(), status(), and writeLog().

Referenced by start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isStopped()

isStopped ( )

Checks if the service is stopped.

Returns
bool True if the service is stopped, false otherwise.

Definition at line 423 of file class.nssm.php.

424 {
425 $status = $this->status();
426 $this->writeLog( 'isStopped ' . $this->getName() . ': ' . ($status == self::STATUS_STOPPED ? 'YES' : 'NO') . ' (status: ' . $status . ')' );
427
428 return $status == self::STATUS_STOPPED;
429 }

References getName(), status(), and writeLog().

Referenced by stop().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ restart()

restart ( )

Restarts the service.

Returns
bool True if the service was restarted successfully, false otherwise.

Definition at line 337 of file class.nssm.php.

338 {
339 if ( $this->stop() ) {
340 return $this->start();
341 }
342
343 return false;
344 }

References start(), and stop().

Here is the call graph for this function:

◆ setBinPath()

setBinPath ( $binPath)

Sets the binary path of the service.

Parameters
string$binPathThe binary path to set.

Definition at line 551 of file class.nssm.php.

552 {
553 $this->binPath = str_replace( '"', '', Path::formatWindowsPath( $binPath ) );
554 }
static formatWindowsPath($path)

References $binPath, and Path\formatWindowsPath().

Here is the call graph for this function:

◆ setDisplayName()

setDisplayName ( $displayName)

Sets the display name of the service.

Parameters
string$displayNameThe display name to set.

Definition at line 531 of file class.nssm.php.

532 {
533 $this->displayName = $displayName;
534 }

References $displayName.

◆ setEnvironmentExtra()

setEnvironmentExtra ( $environmentExtra)

Sets the additional environment variables for the service.

Parameters
string$environmentExtraThe additional environment variables to set.

Definition at line 651 of file class.nssm.php.

652 {
653 $this->environmentExtra = Path::formatWindowsPath( $environmentExtra );
654 }

References $environmentExtra, and Path\formatWindowsPath().

Here is the call graph for this function:

◆ setName()

setName ( $name)

Sets the name of the service.

Parameters
string$nameThe name to set.

Definition at line 511 of file class.nssm.php.

512 {
513 $this->name = $name;
514 }

References $name.

◆ setParams()

setParams ( $params)

Sets the parameters of the service.

Parameters
string$paramsThe parameters to set.

Definition at line 571 of file class.nssm.php.

572 {
573 $this->params = $params;
574 }

References $params.

◆ setStart()

setStart ( $start)

Sets the start type of the service.

Parameters
string$startThe start type to set.

Definition at line 591 of file class.nssm.php.

592 {
593 $this->start = $start;
594 }

References $start, and start().

Here is the call graph for this function:

◆ setStderr()

setStderr ( $stderr)

Sets the stderr path of the service.

Parameters
string$stderrThe stderr path to set.

Definition at line 631 of file class.nssm.php.

632 {
633 $this->stderr = $stderr;
634 }

References $stderr.

◆ setStdout()

setStdout ( $stdout)

Sets the stdout path of the service.

Parameters
string$stdoutThe stdout path to set.

Definition at line 611 of file class.nssm.php.

612 {
613 $this->stdout = $stdout;
614 }

References $stdout.

◆ start()

start ( )

Starts the service.

Returns
bool True if the service was started successfully, false otherwise.

Definition at line 291 of file class.nssm.php.

292 {
293 $this->writeLog( 'Start service ' . $this->getName() );
294
295 $exec = $this->exec( 'start ' . $this->getName() );
296 if ( $exec === false ) {
297 return false;
298 }
299
300 if ( !$this->isRunning() ) {
301 $this->latestError = null;
302
303 return false;
304 }
305
306 return true;
307 }
isRunning()

References exec(), getName(), isRunning(), and writeLog().

Referenced by restart(), and setStart().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ status()

status ( $timeout = true)

Retrieves the status of the service.

Parameters
bool$timeoutWhether to apply a timeout for the status check.
Returns
string The status of the service.

Definition at line 148 of file class.nssm.php.

149 {
150 $this->latestStatus = self::STATUS_NA;
151 $maxtime = time() + self::PENDING_TIMEOUT;
152
153 while ( $this->latestStatus == self::STATUS_NA || $this->isPending( $this->latestStatus ) ) {
154 $exec = $this->exec( 'status ' . $this->getName() );
155 if ( $exec !== false ) {
156 if ( count( $exec ) > 1 ) {
157 $this->latestStatus = self::STATUS_NOT_EXIST;
158 }
159 else {
160 $this->latestStatus = $exec[0];
161 }
162 }
163 if ( $timeout && $maxtime < time() ) {
164 break;
165 }
166
167 // Only sleep if we're going to loop again
168 if ($this->latestStatus == self::STATUS_NA || $this->isPending($this->latestStatus)) {
169 usleep(self::SLEEP_TIME);
170 }
171 }
172
173 if ( $this->latestStatus == self::STATUS_NOT_EXIST ) {
174 $this->latestError = 'Error 3: The specified service does not exist as an installed service.';
175 $this->latestStatus = self::STATUS_NA;
176 }
177
178 return $this->latestStatus;
179 }
isPending($status)

References $latestStatus, exec(), getName(), and isPending().

Referenced by isInstalled(), isPaused(), isRunning(), and isStopped().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stop()

stop ( )

Stops the service.

Returns
bool True if the service was stopped successfully, false otherwise.

Definition at line 314 of file class.nssm.php.

315 {
316 $this->writeLog( 'Stop service ' . $this->getName() );
317
318 $exec = $this->exec( 'stop ' . $this->getName() );
319 if ( $exec === false ) {
320 return false;
321 }
322
323 if ( !$this->isStopped() ) {
324 $this->latestError = null;
325
326 return false;
327 }
328
329 return true;
330 }
isStopped()

References exec(), getName(), isStopped(), and writeLog().

Referenced by delete(), and restart().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeLog()

writeLog ( $log)
private

Writes a log entry.

Parameters
string$logThe log message to write.

Definition at line 79 of file class.nssm.php.

80 {
81 global $bearsamppRoot;
83 }
global $bearsamppRoot
static debug($data, $file=null)
static getNssmLogFilePath($aetrayPath=false)

References $bearsamppRoot, Log\debug(), and Path\getNssmLogFilePath().

Referenced by create(), delete(), isInstalled(), isPaused(), isRunning(), isStopped(), start(), and stop().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ writeLogError()

writeLogError ( $log)
private

Writes an error log entry.

Parameters
string$logThe log message to write.

Definition at line 101 of file class.nssm.php.

102 {
103 global $bearsamppRoot;
105 }
static error($data, $file=null)

References $bearsamppRoot, Log\error(), and Path\getNssmLogFilePath().

Here is the call graph for this function:

◆ writeLogInfo()

writeLogInfo ( $log)
private

Writes an informational log entry.

Parameters
string$logThe log message to write.

Definition at line 90 of file class.nssm.php.

91 {
92 global $bearsamppRoot;
94 }
static info($data, $file=null)

References $bearsamppRoot, Path\getNssmLogFilePath(), and Log\info().

Referenced by exec().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ $binPath

$binPath
private

Definition at line 53 of file class.nssm.php.

Referenced by getBinPath(), and setBinPath().

◆ $displayName

$displayName
private

Definition at line 52 of file class.nssm.php.

Referenced by getDisplayName(), and setDisplayName().

◆ $environmentExtra

$environmentExtra
private

Definition at line 58 of file class.nssm.php.

Referenced by getEnvironmentExtra(), and setEnvironmentExtra().

◆ $latestError

$latestError
private

Definition at line 59 of file class.nssm.php.

Referenced by getError(), and getLatestError().

◆ $latestStatus

$latestStatus
private

Definition at line 60 of file class.nssm.php.

Referenced by getLatestStatus(), and status().

◆ $name

$name
private

Definition at line 51 of file class.nssm.php.

Referenced by __construct(), getName(), and setName().

◆ $params

$params
private

Definition at line 54 of file class.nssm.php.

Referenced by getParams(), and setParams().

◆ $start

$start
private

Definition at line 55 of file class.nssm.php.

Referenced by getStart(), and setStart().

◆ $stderr

$stderr
private

Definition at line 57 of file class.nssm.php.

Referenced by getStderr(), and setStderr().

◆ $stdout

$stdout
private

Definition at line 56 of file class.nssm.php.

Referenced by getStdout(), and setStdout().

◆ INFO_APP_DIRECTORY

const INFO_APP_DIRECTORY = 'AppDirectory'

Definition at line 41 of file class.nssm.php.

◆ INFO_APP_ENVIRONMENT_EXTRA

const INFO_APP_ENVIRONMENT_EXTRA = 'AppEnvironmentExtra'

Definition at line 46 of file class.nssm.php.

◆ INFO_APP_PARAMETERS

const INFO_APP_PARAMETERS = 'AppParameters'

◆ INFO_APP_STDERR

const INFO_APP_STDERR = 'AppStderr'

Definition at line 44 of file class.nssm.php.

◆ INFO_APP_STDOUT

const INFO_APP_STDOUT = 'AppStdout'

Definition at line 45 of file class.nssm.php.

◆ INFO_APPLICATION

const INFO_APPLICATION = 'Application'

Definition at line 42 of file class.nssm.php.

Referenced by infos().

◆ PENDING_TIMEOUT

const PENDING_TIMEOUT = 10

Definition at line 48 of file class.nssm.php.

◆ SERVICE_AUTO_START

const SERVICE_AUTO_START = 'SERVICE_AUTO_START'

Definition at line 20 of file class.nssm.php.

◆ SERVICE_DELAYED_START

const SERVICE_DELAYED_START = 'SERVICE_DELAYED_START'

Definition at line 21 of file class.nssm.php.

◆ SERVICE_DEMAND_START

const SERVICE_DEMAND_START = 'SERVICE_DEMAND_START'

◆ SERVICE_DISABLED

const SERVICE_DISABLED = 'SERVICE_DISABLED'

Definition at line 23 of file class.nssm.php.

◆ SERVICE_INTERACTIVE_PROCESS

const SERVICE_INTERACTIVE_PROCESS = 'SERVICE_INTERACTIVE_PROCESS'

Definition at line 27 of file class.nssm.php.

◆ SERVICE_WIN32_OWN_PROCESS

const SERVICE_WIN32_OWN_PROCESS = 'SERVICE_WIN32_OWN_PROCESS'

Definition at line 26 of file class.nssm.php.

◆ SLEEP_TIME

const SLEEP_TIME = 100000

Definition at line 49 of file class.nssm.php.

◆ STATUS_CONTINUE_PENDING

const STATUS_CONTINUE_PENDING = 'SERVICE_CONTINUE_PENDING'

Definition at line 30 of file class.nssm.php.

◆ STATUS_NA

const STATUS_NA = '-1'

Definition at line 38 of file class.nssm.php.

◆ STATUS_NOT_EXIST

const STATUS_NOT_EXIST = 'SERVICE_NOT_EXIST'

Definition at line 37 of file class.nssm.php.

◆ STATUS_PAUSE_PENDING

const STATUS_PAUSE_PENDING = 'SERVICE_PAUSE_PENDING'

Definition at line 31 of file class.nssm.php.

◆ STATUS_PAUSED

const STATUS_PAUSED = 'SERVICE_PAUSED'

Definition at line 32 of file class.nssm.php.

◆ STATUS_RUNNING

const STATUS_RUNNING = 'SERVICE_RUNNING'

Definition at line 33 of file class.nssm.php.

◆ STATUS_START_PENDING

const STATUS_START_PENDING = 'SERVICE_START_PENDING'

Definition at line 34 of file class.nssm.php.

◆ STATUS_STOP_PENDING

const STATUS_STOP_PENDING = 'SERVICE_STOP_PENDING'

Definition at line 35 of file class.nssm.php.

◆ STATUS_STOPPED

const STATUS_STOPPED = 'SERVICE_STOPPED'

Definition at line 36 of file class.nssm.php.


The documentation for this class was generated from the following file: