Class | Chef::Daemon
In: | lib/chef/daemon.rb
Parent: | Object

### Methods

_change_privilege change_privilege daemonize pid_file pid_from_file remove_pid_file running? save_pid_file

### Attributes

name | [RW] |

### Public Class methods

_change_privilege(user, group=user)

Change privileges of the process to be the specified user and group

#### Parameters

user<String>: | The user to change the process to.
group<String>: | The group to change the process to.

#### Alternatives

If group is left out, the user will be used (changing to user:user)

change_privilege()

Change process user/group to those specified in Chef::Config

daemonize(name)

Daemonize the current process, managing pidfiles and process uid/gid

### Parameters

name<String>: | The name to be used for the pid file

pid_file()

Gets the pid file for @name

#### Returns

String: | Location of the pid file for @name

pid_from_file()

Suck the pid out of pid_file

#### Returns

Integer: | The PID from pid_file
nil: | Returned if the pid_file does not exist.

remove_pid_file()

Delete the PID from the filesystem

running?()

Check if Chef is running based on the pid_file

#### Returns

Boolean:: True if Chef is running False if Chef is not running

save_pid_file()

Store the PID on the filesystem This uses the Chef::Config[:pid_file] option, or "/tmp/name.pid" otherwise

[Validate]