← 返回命令列表

Linux command

runsvdir 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Start supervising services

runsvdir [/etc/service]

Run each service in a new session

runsvdir -P [/etc/service]

Start with a log command

runsvdir [/etc/service] "log: ........................................."

说明

runsvdir starts and monitors a collection of runsv(8) processes. It scans _dir_ at least every five seconds. When a new subdirectory or symlink to a directory appears, runsvdir starts a new runsv process for it. When a subdirectory is removed, the corresponding runsv process is sent a TERM signal. Subdirectories whose names start with a dot are ignored. The maximum number of services is 1000. Sending runsvdir a TERM signal causes it to exit with status 0. Sending a HUP signal causes it to send TERM to all running runsv processes and then exit with status 111.

参数

-P
Use setsid to run each runsv process in a new session and separate process group.

FAQ

What is the runsvdir command used for?

runsvdir starts and monitors a collection of runsv(8) processes. It scans _dir_ at least every five seconds. When a new subdirectory or symlink to a directory appears, runsvdir starts a new runsv process for it. When a subdirectory is removed, the corresponding runsv process is sent a TERM signal. Subdirectories whose names start with a dot are ignored. The maximum number of services is 1000. Sending runsvdir a TERM signal causes it to exit with status 0. Sending a HUP signal causes it to send TERM to all running runsv processes and then exit with status 111.

How do I run a basic runsvdir example?

Run `runsvdir [/etc/service]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -P do in runsvdir?

Use setsid to run each runsv process in a new session and separate process group.