Class: Merb::BootLoader::DropPidFile

Inherits:
Merb::BootLoader show all
Defined in:
lib/merb-core/bootloader.rb

Overview

Stores pid file.

Only run if daemonization or clustering options specified on start. Port is taken from Merb::Config and must be already set at this point.

Class Method Summary collapse

Methods inherited from Merb::BootLoader

after, after_app_loads, before, before_app_loads, before_master_shutdown, before_worker_shutdown, default_framework, finished?, inherited, move_klass

Class Method Details

.runObject

Stores a PID file if Merb is running daemonized or clustered.

Returns

nil

:api: plugin


237
238
239
240
# File 'lib/merb-core/bootloader.rb', line 237

def run
  Merb::Server.store_pid("main") if Merb::Config[:daemonize] || Merb::Config[:cluster]
  nil
end