{
    "content": [
        {
            "type": "text",
            "text": "# runsvdir (man)\n\n## NAME\n\nrunsvdir - starts and monitors a collection of runsv(8) processes\n\n## SYNOPSIS\n\nrunsvdir [-P] dir [ log ]\n\n## DESCRIPTION\n\ndir must be a directory.  log is a space holder for a readproctitle log, and must be at least\nseven characters long or absent.\n\n## TLDR\n\n> Run an entire directory of services.\n\n- Start and manage all services in a directory as the current user:\n  `runsvdir {{path/to/services}}`\n- Start and manage all services in a directory as root:\n  `sudo runsvdir {{path/to/services}}`\n- Start services in separate sessions:\n  `runsvdir -P {{path/to/services}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (1 subsections)\n- **SIGNALS**\n- **SEE ALSO**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "runsvdir",
        "section": "",
        "mode": "man",
        "summary": "runsvdir - starts and monitors a collection of runsv(8) processes",
        "synopsis": "runsvdir [-P] dir [ log ]",
        "tldr_summary": "Run an entire directory of services.",
        "tldr_examples": [
            {
                "description": "Start and manage all services in a directory as the current user",
                "command": "runsvdir {{path/to/services}}"
            },
            {
                "description": "Start and manage all services in a directory as root",
                "command": "sudo runsvdir {{path/to/services}}"
            },
            {
                "description": "Start services in separate sessions",
                "command": "runsvdir -P {{path/to/services}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-P",
                "long": null,
                "arg": null,
                "description": "group."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "sv",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/sv/8/json"
            },
            {
                "name": "runsv",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/runsv/8/json"
            },
            {
                "name": "runsvchdir",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/runsvchdir/8/json"
            },
            {
                "name": "runit",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/runit/8/json"
            },
            {
                "name": "runit-init",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/runit-init/8/json"
            },
            {
                "name": "chpst",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/chpst/8/json"
            },
            {
                "name": "svlogd",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/svlogd/8/json"
            },
            {
                "name": "utmpset",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/utmpset/8/json"
            },
            {
                "name": "setsid",
                "section": "2",
                "url": "https://www.chedong.com/phpMan.php/man/setsid/2/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 20,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-P",
                        "lines": 2,
                        "flag": "-P"
                    }
                ]
            },
            {
                "name": "SIGNALS",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "runsvdir - starts and monitors a collection of runsv(8) processes\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "runsvdir [-P] dir [ log ]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "dir must be a directory.  log is a space holder for a readproctitle log, and must be at least\nseven characters long or absent.\n\nrunsvdir starts a runsv(8) process for each subdirectory, or symlink to a directory,  in  the\nservices directory dir, up to a limit of 1000 subdirectories, and restarts a runsv(8) process\nif it terminates.  runsvdir skips subdirectory names starting with dots.  runsv(8) must be in\nrunsvdir's PATH.\n\nAt least every five seconds runsvdir checks whether the time of last modification, the inode,\nor the device, of the services directory dir has changed.  If so, it re-scans the service di‐\nrectory,  and if it sees a new subdirectory, or new symlink to a directory, in dir, it starts\na new runsv(8) process; if runsvdir sees a subdirectory being  removed  that  was  previously\nthere,  it  sends  the  corresponding  runsv(8)  process a TERM signal, stops monitoring this\nprocess, and so does not restart the runsv(8) process if it exits.\n\nIf the log argument is given to runsvdir, all output to standard error is redirected to  this\nlog,  which  is  similar to the daemontools' readproctitle log.  To see the most recent error\nmessages, use a process-listing tool such as ps(1).  runsvdir writes a dot to the readprocti‐\ntle log every 15 minutes so that old error messages expire.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-P",
                        "content": "group.\n",
                        "flag": "-P"
                    }
                ]
            },
            "SIGNALS": {
                "content": "If runsvdir receives a TERM signal, it exits with 0 immediately.\n\nIf runsvdir receives a HUP signal, it sends a TERM signal to each runsv(8) process it is mon‐\nitoring and then exits with 111.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "sv(8),  runsv(8),  runsvchdir(8),  runit(8),  runit-init(8), chpst(8), svlogd(8), utmpset(8),\nsetsid(2)\n\nhttp://smarden.org/runit/\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Gerrit Pape <pape@smarden.org>\n\n\n\nrunsvdir(8)",
                "subsections": []
            }
        }
    }
}