Table of Contents

mod_posix

This module is required if you wish to daemonize Prosody or have it log to the syslog in a posix compliant environment.

Details

mod_posix implements POSIX. If using the Debian/Ubuntu package the pidfile, setuid and setgid options are handled by the init script at /etc/init.d/prosody.

When loaded, prosody will handle SIGTERM and SIGINT by initiating a graceful shutdown. Also, SIGHUP will cause it to reload the config file.

Usage

    modules_enabled = {
        -- Other modules
        "posix"; -- Enable mod_posix
    }

Configuration

Option Default Notes
daemonize true Whether to daemonize Prosody or not
no_daemonize nil DEPRECATED - use daemonize
run_as_root false If Prosody is run as the root user it will exit unless this option is set to true, use with caution
pidfile nil File to write pid in
umask "027" The bitmask set on files created by Prosody

Example

    modules_enabled = {
        -- Other modules
        "posix"; -- Enable mod_posix
    }
 
    run_as_root = true -- Are you crazy? Prosody doesn't need root access!
    daemonize = false
    pidfile = "/tmp/prosody.pid"
    umask = "027"